#29780: Using default UserModel in django.contrib.auth forms
------------------------------------------------+------------------------
Reporter: Marcelo Canina | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.auth | Version: 2.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------------+------------------------
In django.contrib.auth.forms.py we have the
{{{
UserModel = get_user_model()
}}}
but User model is used twice in: UserCreationForm and UserChangeForm in
theirs `meta`
{{{
class UserChangeForm(forms.ModelForm):
class Meta:
model = User
}}}
I think above forms should use UserModel instead of User so there is no
need to subclass them to use project's user model when using a custom User
model.
--
Ticket URL: <https://code.djangoproject.com/ticket/29780>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.85fa79b92cc6f4e6146b9f640eb17b1d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.