At the end of this section
(https://docs.djangoproject.com/en/1.11/topics/auth/customizing/#custom-
users-and-the-built-in-auth-forms) it specifies that one can simply
override the `fields` in the `Meta` of one's `UserCreationForm`. However,
as the UserAdmin uses a custom `get_fieldsets` method which uses its
`add_fieldsets` attribute instead, overriding `fields` does nothing.
--
Ticket URL: <https://code.djangoproject.com/ticket/28667>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
* type: Bug => Cleanup/optimization
--
Ticket URL: <https://code.djangoproject.com/ticket/28667#comment:1>
* owner: nobody => messfish
* status: new => assigned
Comment:
I would like to fix this minor problem to let me have a better grasp of
django.
--
Ticket URL: <https://code.djangoproject.com/ticket/28667#comment:2>
* owner: messfish => Bhavesh Praveen
--
Ticket URL: <https://code.djangoproject.com/ticket/28667#comment:3>
* owner: nobody => Dunstrom
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/28667#comment:2>
Comment (by Hampus Dunström):
I plan to be done with this at the end of October.
--
Ticket URL: <https://code.djangoproject.com/ticket/28667#comment:3>
Comment (by Hampus Dunström):
I'm having a hard time creating a test app with a `UserCreationForm` for a
model based on the `django.contrib.auth.admin.UserAdmin` class. Is this
not the class. Is there any example code anyone can show me?
> At the end of this section
(https://docs.djangoproject.com/en/1.11/topics/auth/customizing/#custom-
users-and-the-built-in-auth-forms) it specifies that one can simply
override the fields in the Meta of one's UserCreationForm.
Above this example it is stated that it only works if the model is a
simple subclass of `AbstractUser`. Do we want another example for
`UserAdmin` or what are we looking for? Maybe I'm not the right person for
this issue, I don't know. If any of you guys know anything or can clarify
please let me know.
--
Ticket URL: <https://code.djangoproject.com/ticket/28667#comment:4>
* owner: Hampus Dunström => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/28667#comment:5>
* status: new => assigned
* owner: (none) => eadhina
--
Ticket URL: <https://code.djangoproject.com/ticket/28667#comment:6>
* owner: eadhina => (none)
* status: assigned => new
Comment:
Given the lack of updates I'm going to de-assign this issue so someone
else looking can pick it up.
--
Ticket URL: <https://code.djangoproject.com/ticket/28667#comment:7>
* owner: (none) => armansabyr
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/28667#comment:8>
* owner: (none) => Swatantra
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/28667#comment:8>
* has_patch: 0 => 1
* version: 1.11 => 2.2
Comment:
[https://github.com/django/django/pull/11515 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/28667#comment:9>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"c13e3715f5f46f2ee4ddba357e2589a45e831813" c13e3715]:
{{{
#!CommitTicketReference repository=""
revision="c13e3715f5f46f2ee4ddba357e2589a45e831813"
Fixed #28667 -- Clarified how to override list of forms fields for custom
UserAdmin with a custom user model.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28667#comment:10>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"7d52d056e370734f3938d7cf3ab30e06205f1f85" 7d52d056]:
{{{
#!CommitTicketReference repository=""
revision="7d52d056e370734f3938d7cf3ab30e06205f1f85"
[2.2.x] Fixed #28667 -- Clarified how to override list of forms fields for
custom UserAdmin with a custom user model.
Backport of c13e3715f5f46f2ee4ddba357e2589a45e831813 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28667#comment:11>