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:
Pcoder 2017-07-18 21:38:01 +02:00 committed by GitHub
commit dc5276c217

View file

@ -51,6 +51,8 @@ class MyUserManager(BaseUserManager):
name=name, name=name,
) )
user.is_admin = True user.is_admin = True
user.is_active = True
user.is_superuser = True
user.save(using=self._db) user.save(using=self._db)
return user return user