mirror of
https://github.com/django/django.git
synced 2025-08-15 14:29:12 +00:00
Fixed #19074 -- Corrected some minor issues with the new custom User docs.
Thanks to Bradley Ayers for the review.
This commit is contained in:
parent
b9039268a1
commit
12f39be508
@ -2074,13 +2074,13 @@ authentication app::
|
|||||||
Creates and saves a superuser with the given email, date of
|
Creates and saves a superuser with the given email, date of
|
||||||
birth and password.
|
birth and password.
|
||||||
"""
|
"""
|
||||||
u = self.create_user(username,
|
user = self.create_user(username,
|
||||||
password=password,
|
password=password,
|
||||||
date_of_birth=date_of_birth
|
date_of_birth=date_of_birth
|
||||||
)
|
)
|
||||||
u.is_admin = True
|
user.is_admin = True
|
||||||
u.save(using=self._db)
|
user.save(using=self._db)
|
||||||
return u
|
return user
|
||||||
|
|
||||||
|
|
||||||
class MyUser(AbstractBaseUser):
|
class MyUser(AbstractBaseUser):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user