create_superuser(*username_field*, password, **other_fields)
The prototype of create_superuser()
should accept the username field, plus all required fields as arguments. For example, if your user model uses email
as the username field, and has date_of_birth
as a required field, then create_superuser
should be defined as:
def create_superuser(self, email, date_of_birth, password): # create superuser here ...
Unlike create_user()
, create_superuser()
must require the caller to provide a password.
Please login to continue.