added user type
This commit is contained in:
parent
cff6de1dc0
commit
5e9d26ff8e
@ -5,6 +5,15 @@ from .managers import UserManager
|
||||
|
||||
|
||||
class User(AbstractBaseUser):
|
||||
|
||||
ADMIN = "admin"
|
||||
STANDARD = "standard"
|
||||
|
||||
USER_TYPES = (
|
||||
("admin", ADMIN),
|
||||
("standard", STANDARD),
|
||||
)
|
||||
|
||||
first_name = models.CharField(max_length=100)
|
||||
last_name = models.CharField(max_length=100)
|
||||
|
||||
@ -14,6 +23,7 @@ class User(AbstractBaseUser):
|
||||
confirmation_number = models.CharField(max_length=100)
|
||||
reset_code = models.IntegerField(null=True)
|
||||
avatar = models.ImageField(upload_to="avatars/", null=True)
|
||||
type = models.CharField(choices=USER_TYPES, default=STANDARD, max_length=100)
|
||||
|
||||
USERNAME_FIELD = "email"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user