|
@@ -64,8 +64,7 @@ def validate_upper(value):
|
|
|
class MyUserManager(BaseUserManager):
|
|
|
def create_user(self, email, password, **extra_fields):
|
|
|
"""
|
|
|
- Creates and saves a User with the given email, date of
|
|
|
- birth and password.
|
|
|
+ Creates and saves a User with the given email and password.
|
|
|
"""
|
|
|
if not email:
|
|
|
raise ValueError('Users must have an email address')
|
|
@@ -76,16 +75,6 @@ class MyUserManager(BaseUserManager):
|
|
|
user.save(using=self._db)
|
|
|
return user
|
|
|
|
|
|
- def create_superuser(self, email, password):
|
|
|
- """
|
|
|
- Creates and saves a superuser with the given email, date of
|
|
|
- birth and password.
|
|
|
- """
|
|
|
- user = self.create_user(email, password=password)
|
|
|
- user.is_admin = True
|
|
|
- user.save(using=self._db)
|
|
|
- return user
|
|
|
-
|
|
|
|
|
|
class User(ExportModelOperationsMixin('User'), AbstractBaseUser):
|
|
|
@staticmethod
|