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:
Andrii Marynets 2017-07-16 16:51:07 +03:00
parent 05db0517bb
commit 9f050467a1

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