Merge pull request #398 from amarynets/bugfix/superuser_does_not_see_all_admin_site
The superadmin user when created is now active by default and is_superuser is set to true.
This commit is contained in:
commit
dc5276c217
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