Opened 12 years ago

Closed 12 years ago

#19113 closed Cleanup/optimization (invalid)

usermanager in new user auth produces error

Reported by: anonymous Owned by: nobody
Component: Documentation Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

def create_superuser(self, username, date_of_birth, password):

"""
Creates and saves a superuser with the given email, date of
birth and password.
"""
user = self.create_user(username,

password=password,
date_of_birth=date_of_birth

)
user.is_admin = True
user.save(using=self._db)
return user

The above code is example but in the model it specifies only email and not username, and so produces a type error - TypeError: create_superuser() got an unexpected keyword argument 'username'

This is for version 1.5 and not 1.4 as it says below.

Change History (1)

comment:1 by francis idada <francis.idada@…>, 12 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top