配置用户信息的models时,如果继承Abstractuser类时,报错:
ERRORS:
auth.User.groups: (fields.E304) Reverse accessor for 'User.groups' clashes with reverse accessor for 'UserInfo.groups'.
HINT: Add or change a related_name argument to the definition for 'User.groups' or 'UserInfo.groups'.
需要配置setting.py,添加:
AUTH_USER_MODEL = 'users.类名'
覆盖django的user表。