增加几个 model

This commit is contained in:
virusdefender committed 2015-07-18 17:17:33 +08:00
1 parent 3ee4b57802
commit c6d6b13072
3 files changed
+12 -2

No files matched your search

+3
View File
@@ -15,7 +15,10 @@ class UserManager(models.Manager):
class User(AbstractBaseUser):
# 用户名
username = models.CharField(max_length=30, unique=True)
# 真实姓名
real_name = models.CharField(max_length=30, blank=True, null=True)
admin_group = models.ForeignKey(AdminGroup, null=True, on_delete=models.SET_NULL)
USERNAME_FIELD = 'username'