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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access