You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
text/user/models.py

10 lines
371 B

from django.db import models
from django.contrib.auth.models import AbstractUser
class MyUser(AbstractUser):
qq = models.CharField('QQ号码', max_length=20)
weChat = models.CharField('微信账号', max_length=20)
mobile = models.CharField('手机号码', max_length=11, unique=True)
# 设置返回值
def __str__(self):
return self.username