added custom user endpoints
This commit is contained in:
@@ -26,6 +26,7 @@ class UserManager(BaseUserManager):
|
||||
def create_superuser(self, email, password, **extra_fields):
|
||||
extra_fields.setdefault('is_superuser', True)
|
||||
extra_fields.setdefault('is_staff', True)
|
||||
extra_fields.setdefault('is_active', True)
|
||||
|
||||
if extra_fields.get('is_superuser') is not True:
|
||||
raise ValueError('Superuser must have is_superuser=True.')
|
||||
|
||||
Reference in New Issue
Block a user