-
Notifications
You must be signed in to change notification settings - Fork 42
Auth user model changes #5
base: master
Are you sure you want to change the base?
Conversation
…ithout a profile object wouldn't stick
Looks good to go! I'd love for this to be merged so i can use the 'official' version in my project instead of a fork... @tomchristie |
from django.conf import settings | ||
|
||
|
||
if hasattr(django.contrib.auth, 'get_user_model'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would make sense to use getattr(settings, 'AUTH_USER_MODEL', 'auth.User')
here instead of the branching.
It might still need a quick;
as the migrations are not updated yet to reflect the other changes... |
We need to do some thinking about the migrations. Is it actually possible to support all of the following cases?
This StackOverflow question might be useful: http://stackoverflow.com/questions/15472704/trouble-migrating-reusable-django-app-models-to-use-a-custom-user-model Perhaps we should leave complex cases to the user - just document using the |
i think you can only go so far in supporting all of these. if you've already run the migration nothing will happen if you upgrade django-user-roles which is probably what you want anyway. if your moving to a custom user model it's your own responsibility to make a data migration that makes sense i would think... |
Now supports custom User models in Django 1.5 and above.