[Django]-Django Reverse Accessor Clashes

73👍

related_name‘s must be unique. You’re giving the same name to all the related_name‘s.

Try to rename them like this:

user = models.OneToOneField(User, related_name="custom_user_profile", primary_key=True)
#..
provider = models.OneToOneField(Provider, related_name='user_ind_provider_profile')
#..
provider = models.OneToOneField(Provider, related_name='user_org_provider_profile')

Leave a comment