Positional parameter is missing.
--
Ticket URL: <https://code.djangoproject.com/ticket/33122>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "createsuperuser-username_field.patch" added.
patch to add the username positional parameter
* cc: Raymond Olavides (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/33122#comment:1>
* status: new => closed
* resolution: => invalid
Comment:
This appears to be a usage mistake. You need to use a custom manager with
your user model that defines
[https://docs.djangoproject.com/en/stable/topics/auth/customizing/#django.contrib.auth.models.CustomUserManager.create_superuser
create_superuser()] with appropriate parameters (corresponding to your
`USERNAME_FIELD`.
For an example of how this works, you can look at Django's
[https://github.com/django/django/blob/32b7ffc2bbfd1ae055bdbe287f8598de731adce1/tests/auth_tests/test_management.py#L335
test] for `createsuperuser` which uses
[https://github.com/django/django/blob/32b7ffc2bbfd1ae055bdbe287f8598de731adce1/tests/auth_tests/models/custom_user.py
a custom user] that defines `REQUIRED_FIELDS`.
--
Ticket URL: <https://code.djangoproject.com/ticket/33122#comment:2>
Comment (by Raymond Olavides):
The only missing column from the custom UserModel is username, the rest is
the same with the original UserModel.
Thank you for pointing out a usage issue.
--
Ticket URL: <https://code.djangoproject.com/ticket/33122#comment:3>