3👍
I can think of following reasons:
Django updates
You have to update your contrib.auth
each time you update Django so you don’t break your application, and this is a maintenance nightmare. Using AUTH_PROFILE_MODEL
method makes Django updates painless while it provides ability to add new information to User
. This is called loose coupling i belive.
User
dependant applications
3rd party application that heavily rely on User
having the exact same fields will fail if you for example add fields to User
model that are declared as NOT NULL
or remove some that are expected to be there.
Further reading about AUTH_PROFILE_MODEL
:
- James Bennett’s tips on extending User model
- Django official docs
- deprecation of AUTH_PROFILE_MODULE thread on django-developers mailing list
1👍
Short answer, it is more maintainable to use profiles. Based on my understanding what is advised against is making changes that will be removed once you update your Django version. If you modify django.contrib.auth.models.User
model, then the changes will be removed once you update, or you will be responsibly for merging any changes done if any. On the other hand if the code lives in your application such as the profiles does then it’s easier to manage. Based on that if you find another method that achieves the same, or if you don’t see it as a maintenance hassle then It should not matter much one way or the other.
- [Django]-Why won't elastic beanstalk render css for the django admin site?
- [Django]-Django and django oscar
- [Django]-DJango URL Reverse Error: argument to reversed() must be a sequence