#19077: UserAdmin.add_view should handle USERNAME_FIELD on custom User models
-------------------------------------+-------------------------------------
     Reporter:  gwahl@…              |                    Owner:  nobody
         Type:  Uncategorized        |                   Status:  new
    Component:  Documentation        |                  Version:  master
     Severity:  Release blocker      |               Resolution:
     Keywords:                       |             Triage Stage:  Ready for
    Has patch:  1                    |  checkin
  Needs tests:  0                    |      Needs documentation:  0
Easy pickings:  0                    |  Patch needs improvement:  0
                                     |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by gwahl@…):

 The documentation change alone doesn't fix this -- they were changed to
 say that UserAdmin respects `USERNAME_FIELD`, but without the code to
 support `USERNAME_FIELD`, there is not much functionality left in
 UserAdmin to subclass. I understand that the fieldsets and forms must be
 changed, but I think the actual view code in UserAdmin should work with
 any User that follows the basic contract. My normal user model just
 changes `username` to `email`, and first/last name for preferred/full
 name. Without UserAdmin respecting `USERNAME_FIELD`, it is almost entirely
 useless for even the slightest modification to users because several of
 the view functions have to be completely overridden.

 I agree that UserAdmin should not undergo massive changes to support
 custom users, but it should at least support the `USERNAME_FIELD` part of
 the contract, so it is ''possible'' to usefully subclass it for your own
 user.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19077#comment:8>
Django <https://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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to