Opened 9 years ago

Closed 9 years ago

#25557 closed Bug (duplicate)

Fix the UserCreationForm for custom user model

Reported by: Pierre Dulac Owned by: nobody
Component: contrib.auth Version: 1.9a1
Severity: Normal Keywords: admin, custom, user
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The admin user creation form was trying to set the username field of the User model, but that field does not exists for sure in case of a custom user model.

But this *field* should be referred as User.USERNAME_FIELD to fully support Usual and Custom user models.

I've prepared a pull request associated to it : https://github.com/django/django/pull/5432

Cheers

Change History (1)

comment:1 by Tim Graham, 9 years ago

Component: contrib.admincontrib.auth
Resolution: duplicate
Status: newclosed
Summary: Fix the admin user creation form for custom user modelFix the UserCreationForm for custom user model

Duplicate of #19353. Tests and documentation updates are also required as noted in that ticket if you'd like to try to finish it.

Note: See TracTickets for help on using tickets.
Back to Top