22.6 Putting It All Together

When changing the information about the user in Django, we have two choices. If we want to add information, we can create a Profile model to add the information. If we wish to remove or change information or behavior, we need to customize the User model, made possible because it is a swappable model.

Determining what information the product needs to work is one of the first questions a developer should ask when building a website in Django, largely because changing the User model affects the migration system in a very disruptive manner (we deleted our database because that was the best option—this option will not always be available to you).

In modern Django, best practice is to have as little information as possible ...

Get Django Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.