close

[Solved] auth.User.groups: (fields.E304) Reverse accessor for ‘User.groups’ clashes with reverse accessor for ‘UserManage.groups’

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error auth.User.groups: (fields.E304) Reverse accessor for ‘User.groups’ clashes with reverse accessor for ‘UserManage.groups’ in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How auth.User.groups: (fields.E304) Reverse accessor for ‘User.groups’ clashes with reverse accessor for ‘UserManage.groups’ Error Occurs?

Today I get the following error auth.User.groups: (fields.E304) Reverse accessor for ‘User.groups’ clashes with reverse accessor for ‘UserManage.groups’ in python.

How To Solve auth.User.groups: (fields.E304) Reverse accessor for ‘User.groups’ clashes with reverse accessor for ‘UserManage.groups’ Error ?

  1. How To Solve auth.User.groups: (fields.E304) Reverse accessor for 'User.groups' clashes with reverse accessor for 'UserManage.groups' Error ?

    To Solve auth.User.groups: (fields.E304) Reverse accessor for 'User.groups' clashes with reverse accessor for 'UserManage.groups' Error Add this setting.py AUTH_USER_MODEL = "myapp.User"

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

    To Solve auth.User.groups: (fields.E304) Reverse accessor for 'User.groups' clashes with reverse accessor for 'UserManage.groups' Error Add this setting.py AUTH_USER_MODEL = "myapp.User"

Solution 1

Add the following to settings.py:

AUTH_USER_MODEL = "users_management.UserManage" 

More generally,

AUTH_USER_MODEL = 'YourAppName.YourClassName'
  • YourAppName: This is the name of the app that will have the User Model
  • YourClassName: This is the name of the class used inside the models.py file

Solution 2

Add this setting.py AUTH_USER_MODEL = "myapp.User"

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read