SystemCheckError: System check identified some issues:
ERRORS:
auth.User.groups:
(fields.E304
) Reverse accessor
for 'User.groups' clashes with reverse accessor
for 'Users.groups'.
HINT: Add or change a related_name argument to the definition
for 'User.groups' or
'Users.groups'.
auth.User.user_permissions:
(fields.E304
) Reverse accessor
for 'User.user_permissions' clashes with reverse accessor
for 'Users.user_permissions'.
HINT: Add or change a related_name argument to the definition
for 'User.user_permissions' or
'Users.user_permissions'.
user.Users.groups:
(fields.E304
) Reverse accessor
for 'Users.groups' clashes with reverse accessor
for 'User.groups'.
HINT: Add or change a related_name argument to the definition
for 'Users.groups' or
'User.groups'.
user.Users.user_permissions:
(fields.E304
) Reverse accessor
for 'Users.user_permissions' clashes with reverse accessor
for 'User.user_permissions'.
HINT: Add or change a related_name argument to the definition
for 'Users.user_permissions' or
'User.user_permissions'.
在网上查了一下,这个报错是因为重写用户模型继承了AbstractUser,而没有在settings里面进行配置: 在settings.py里面配置:
AUTH_USER_MODEL
= 'user.Users'