#3011: Allow for extendable auth_user module
------------------------------------+---------------------------------------
          Reporter:  nowell strite  |         Owner:  seocam   
            Status:  assigned       |     Milestone:           
         Component:  Contrib apps   |       Version:           
        Resolution:                 |      Keywords:  auth_user
             Stage:  Accepted       |     Has_patch:  1        
        Needs_docs:  1              |   Needs_tests:  1        
Needs_better_patch:  1              |  
------------------------------------+---------------------------------------
Comment (by HM):

 I use the function get_user_model() which reads from a setting what user-
 model to use. Then instead of

 {{{
     from django.contrib.auth.models import User
     ...
     user = models.ForeignKey(User...
 }}}

 I do

 {{{
     User = get_user_model()
     ...
     user = models.ForeignKey(User...
 }}}

 The apps using the user-model must not have conflicting needs of course,
 but we are after all using Python and are all consenting adults, right? No
 need for handcuffs and bullet-proof contracts.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3011#comment:71>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to