增加几个 model

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

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'