django建表报错

报错信息如下:

aise SystemCheckError(msg)
django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues:

ERRORS:
auth.User.groups: (fields.E304) Reverse accessor for 'User.groups' clashes with reverse accessor for 'UserInfo.groups'

解决方案如下:

在settings.py文件里加入

AUTH_USER_MODEL = 'users.UserProfile'
其中

users:你的app名

UserProfile:你的model类

猜你喜欢

转载自www.cnblogs.com/jubing/p/11001336.html
今日推荐