SystemCheckError: System check identified some issues: ERRORS: users.Test.groups: (fields.E304) Reverse accessor for 'Test.groups' clashes with reverse accessor for 'User.groups'.

2023-05-16,,

Error Msg:

SystemCheckError: System check identified some issues:
ERRORS:
users.Test.groups: (fields.E304) Reverse accessor for 'Test.groups' clashes with reverse accessor for 'User.groups'.
HINT: Add or change a related_name argument to the definition for 'Test.groups' or 'User.groups'.
users.Test.user_permissions: (fields.E304) Reverse accessor for 'Test.user_permissions' clashes with reverse accessor for 'User.user_permissions'.
HINT: Add or change a related_name argument to the definition for 'Test.user_permissions' or 'User.user_permissions'.
users.User.groups: (fields.E304) Reverse accessor for 'User.groups' clashes with reverse accessor for 'Test.groups'.
HINT: Add or change a related_name argument to the definition for 'User.groups' or 'Test.groups'.

问题:

  抽象基类创建完成后, 没有在setting中声明, 或者声明错误
解决:

  setting.py中加入:

    AUTH_USER_MODEL = ""users.User""

SystemCheckError: System check identified some issues: ERRORS: users.Test.groups: (fields.E304) Reverse accessor for 'Test.groups' clashes with reverse accessor for 'User.groups'.的相关教程结束。

《SystemCheckError: System check identified some issues: ERRORS: users.Test.groups: (fields.E304) Reverse accessor for 'Test.groups' clashes with reverse accessor for 'User.groups'..doc》

下载本文的Word格式文档,以方便收藏与打印。