SystemCheckError: System check identified some issues:
ERRORS:
auth.User.groups: (fields.E304) Reverse accessor for 'User.groups' *es with reverse accessor for 'UserInfo.groups'.
HINT: Add or change a related_name argument to the definition for 'User.groups' or 'UserInfo.groups'.
auth.User.user_permissions: (fields.E304) Reverse accessor for 'User.user_permissions' *es with reverse accessor for 'UserInfo.user_permissions'.
HINT: Add or change a related_name argument to the definition for 'User.user_permissions' or 'UserInfo.user_permissions'.
blog.UserInfo.groups: (fields.E304) Reverse accessor for 'UserInfo.groups' *es with reverse accessor for 'User.groups'.
HINT: Add or change a related_name argument to the definition for 'UserInfo.groups' or 'User.groups'.
blog.UserInfo.user_permissions: (fields.E304) Reverse accessor for 'UserInfo.user_permissions' *es with reverse accessor for 'User.user_permissions'.
HINT: Add or change a related_name argument to the definition for 'UserInfo.user_permissions' or 'User.user_permissions'.
这是由于UserProfile扩展了内置的auth_user表,没有进行配置使用新定义的UserProfile表来做用户认证造成的异常
解决办法:
在settings.py中,添加使用UserProfile的配置选项:
AUTH_USER_MODEL = “app名.扩展表的表明”