From 9f050467a1e5eff3d29ea305ea01902828750f15 Mon Sep 17 00:00:00 2001 From: Andrii Marynets Date: Sun, 16 Jul 2017 16:51:07 +0300 Subject: [PATCH] Add flag is_superuser=True in CustomUserManager Missing is_superuser=True was the reason why createsuperuser command did'n make user with all staff --- membership/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/membership/models.py b/membership/models.py index 96bf4c50..a84d12ca 100644 --- a/membership/models.py +++ b/membership/models.py @@ -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