创建自定义UserInfo表
models.py中
from django.contrib.auth.models import AbstractUser from django_pandas.managers import DataFrameManager # Create your models here. class UserInfo(AbstractUser): # 自定义字段和正常在model中定义属性现样 create_time = models.DateTimeField(auto_now_add=True) nid = models.AutoField(primary_key=True) telephone = models.CharFiled(max_lenth=11, null=True, nuique=True)
settings.py中
# 自定义用户表 AUTH_USER_MODEL = 'app01.UserInfo'