为User problems_status 添加默认值,并精简了相关代码

This commit is contained in:
sxw@401
2015-09-15 20:28:58 +08:00
parent 21b18b8e97
commit 18e661ad68
5 changed files with 23 additions and 11 deletions

View File

@@ -31,8 +31,7 @@ class User(AbstractBaseUser):
# 0代表不是管理员 1是普通管理员 2是超级管理员
admin_type = models.IntegerField(default=0)
# JSON字典用来表示该用户的问题的解决状态 1为ac2为正在进行
problems_status = models.TextField(blank=True)
problems_status = models.TextField(default="{}")
USERNAME_FIELD = 'username'
REQUIRED_FIELDS = []