Monday, July 21, 2014

Converting to Custom User Model (Django 1.5)

We are currently using the following user model setup:

settings.py:
AUTH_USER_MODEL = 'auth.User'

userprofile.py:
class UserProfile(DirtyFieldsMixin, User):

Is it possible to change these to the following and have South take care of the data as not lose anything?

settings.py:
AUTH_USER_MODEL = 'userprofile.UserProfile'

userprofile.py:
class UserProfile(DirtyFieldsMixin, AbstractUser):

I have looked through here and the rest of google and all the answers show created a new custom user that you copy everything to. Is it possible to continue to use our UserProfile but just convert it to extend AbstractUser as made possible in Django 1.5 (which we are currently using)?

Thanks!

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/507e89b9-bde1-4cfe-bf32-1c7a8b973d1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment