Пример #1
0
class User(AbstractBaseUser):
    email = models.EmaIlField(max_length =255,unique=True)
    staff = models.BooleanField(default=True)
    active = models.BooleanField(default=False)
    admin = models.BooleanField(default=False)

    
Пример #2
0
class User(AbstractBaseUser):
    email = models.EmaIlField(max_length=255, unique=True)
    staff = models.BooleanField(default=True)
    active = models.BooleanField(default=False)
    admin = models.BooleanField(default=False)

    USERNAME_FIELD = 'email'

    REQUIRED_FIELDS
Пример #3
0
class User(AbstractBaseUser):
    email = models.EmaIlField(max_length=255, unique=True)
    staff = models.BooleanField(default=True)
    active = models.BooleanField(default=False)
    admin = models.BooleanField(default=False)

    USERNAME_FIELD = 'email'

    REQUIRED_FIELDS = []

    def __str__(self):
        return self.email

    def get_full_name(self):
        return self.email
Пример #4
0
class User(AbstractBaseUser):
    email = models.EmaIlField(max_length=255, unique=True)
    pass
Пример #5
0
class User(AbstractBaseUser):
    email = models.EmaIlField(max_length =
    pass
Пример #6
0
class User(AbstractBaseUser):
    email = models.EmaIlField(max_length=255, unique=True)
    staff = models.BooleanField(default)
    pass