--
Ticket URL: <https://code.djangoproject.com/ticket/30066>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => Abhishek Bera
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:1>
Comment (by Abhishek Bera):
I added a test case with no email and password for the super user which
failed. later i changed the code in the models to email = None and
password = None in the contrib/auth/models createsuperuser params.
--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:2>
* has_patch: 0 => 1
* type: Bug => Cleanup/optimization
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:3>
* needs_better_patch: 0 => 1
Comment:
[https://docs.djangoproject.com/en/dev/topics/auth/customizing/#django.contrib.auth.models.CustomUserManager.create_superuser
The documentation] says, The prototype of `create_superuser()` should
accept the username field, plus all required fields as arguments." and
"Unlike `create_user()`, `create_superuser()` must require the caller to
provide a password."
For the default user mode, `User.REQUIRED_FIELDS = ['email']` so that
explains the original implementation. The documentation for
`CustomUserManager.create_user()` wasn't updated after
f54135fa4dc9fd45d86ea2944191d58e00725779. It still says, "The prototype of
`create_user()` should accept the username field, plus all required fields
as arguments." which is violated for the default case.
I don't have a strong opinion about how to proceed but if we proceed with
the changes, some documentation changes are required.
--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:4>
* owner: Abhishek Bera => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:5>
* owner: (none) => xurror
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:6>
* owner: (none) => Daniel Rios
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:6>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:7>
* needs_better_patch: 0 => 1
Comment:
Just a couple of minor comments on the PR. Marking "Patch needs
improvement", please uncheck that when those are addressed.
--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:8>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:9>
* version: 2.1 => master
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:10>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"b5a5c92c72cc179b5a9a888039cdd2f0680bff36" b5a5c92c]:
{{{
#!CommitTicketReference repository=""
revision="b5a5c92c72cc179b5a9a888039cdd2f0680bff36"
Fixed #30066 -- Enabled super user creation without email and password
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30066#comment:11>