coldfront
coldfront copied to clipboard
Replace explicit User references with get_user_model and settings.AUTH_USER_MODEL
We're currently using a custom Django user model for some libraries that we use with our billing system. It would be valuable to use the custom model in place of the standard Django User.
I can generate a PR with the necessary changes.
@aaronk Thanks for the feedback. We'll have to investigate this a bit more as it appears this can be difficult to change. See here.
It can definitely be difficult to change to a new user model mid-project. However, as we are starting fresh, all I'll need to do is add our library early in the Django APPS list and we'll be good to go. It shouldn't affect your existing customers since django.contrib.auth.models.User is the default.
@aebruno I agree with @aaronk it would be beneficial to make the user model pluggable and hence help one starting fresh. Changing the current UserProfile model to add site specific attributes requires keeping up with future upgrades of the core app. I wonder how other sites are extending it, if they are?