Re: Extend user model multiple times
Personally I think get_profile() is an anti-pattern, just access it
like any other OneToOneField (and that's what you want... not
unique=True on a ForeignKey). Just set up a models.OneToOneField(User,
related_name=XXX), then you can access the profile as user.XXX. The
User model and all of its associated limitations are my least favorite
thing about django. Hopefully, we'll get some kind of lazy loading
User model that we can easily override and extend (and will still play
nice with the django ecosystem) in the future.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home