Add flag is_superuser=True in CustomUserManager
Missing is_superuser=True was the reason why createsuperuser command did'n make user with all staff
This commit is contained in:
parent
05db0517bb
commit
9f050467a1
1 changed files with 2 additions and 0 deletions
|
@ -51,6 +51,8 @@ class MyUserManager(BaseUserManager):
|
|||
name=name,
|
||||
)
|
||||
user.is_admin = True
|
||||
user.is_active = True
|
||||
user.is_superuser = True
|
||||
user.save(using=self._db)
|
||||
return user
|
||||
|
||||
|
|
Loading…
Reference in a new issue