增加禁用用户的功能

This commit is contained in:
spxcds
2016-03-27 01:26:24 +08:00
parent 13c73e71b8
commit 7a841214d4
7 changed files with 45 additions and 7 deletions

View File

@@ -41,6 +41,8 @@ class User(AbstractBaseUser):
tfa_token = models.CharField(max_length=40, blank=True, null=True)
# open api key
openapi_appkey = models.CharField(max_length=35, blank=True, null=True)
# 是否禁用用户
is_forbidden = models.BooleanField(default=False)
USERNAME_FIELD = 'username'
REQUIRED_FIELDS = []