Fixed #30066 -- Enabled super user creation without email and password

This commit is contained in:
daniel a rios 2019-06-14 11:12:08 +02:00 committed by Carlton Gibson
parent 57b9604451
commit b5a5c92c72
4 changed files with 25 additions and 8 deletions

View file

@ -282,11 +282,15 @@ Manager methods
See :ref:`Creating users <topics-auth-creating-users>` for example usage.
.. method:: create_superuser(username, email, password, **extra_fields)
.. method:: create_superuser(username, email=None, password=None, **extra_fields)
Same as :meth:`create_user`, but sets :attr:`~models.User.is_staff` and
:attr:`~models.User.is_superuser` to ``True``.
.. versionchanged:: 3.0
The ``email`` and ``password`` parameters were made optional.
``AnonymousUser`` object
========================