Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6008889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:53:33+00:00 2026-05-23T01:53:33+00:00

This is the error I get . auth.permission: Accessor for field ‘content_type’ clashes with

  • 0

This is the error I get .

   auth.permission: Accessor for field 'content_type' clashes with related field 'ContentType.permission_set'. Add a related_name argument to the definition for 'content_type'.
    permissions.permission: Accessor for field 'table' clashes with related field 'ContentType.permission_set'. Add a related_name argument to the definition for 'table'.

This is my model .

from django.contrib.gis.db import models
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from maps.models import  Sdr_Layer

class Permission(models.Model):
    user = models.ForeignKey(User)
    table = models.ForeignKey(ContentType)
    permi = models.IntegerField()

Can someone explain to me what the error means and how to remove it ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T01:53:34+00:00Added an answer on May 23, 2026 at 1:53 am

    The problem is that when you create a ForeignKey linking to another model, there is a backward relationship automatically created on that to model. In your case on permissions.Permission the ForeignKey to ContentType means there will be a manager added to ContentType called permission_set that will allow access back to permissions.Permission objects that link to it.

    The reason why it does not work is that it’s ambiguous whether the backward relationship manager permission_set should refer to your permissions.Permission model, or the built-in auth.Permission model. (Both have a ForeignKey to ContentType, and so a backward relationship manager is created for both.)

    To resolve this problem, you must use the related_name parameter to ForeignKey. This allows your to override the default FOO_set name, with your own. e.g.:

    class Permission(models.Model):
        user = models.ForeignKey(User)
        table = models.ForeignKey(ContentType, related_name='custom_permission_set') 
        permi = models.IntegerField()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Why I get this error? Page not found (404) Using the URLconf defined in
I always get this error when trying to compile my file with Boost::GIL PNG
I get this error: Can't locate Foo.pm in @INC Is there an easier way
I get this error on an update panel within a popupControlExtender which is within
I get this error when I do an svn update : Working copy XXXXXXXX
I continue to get this error: Object '%s' cannot be renamed because the object
I get this error:- You have an error in your SQL syntax; check the
We get this error in Visual Studio 2005 and TFS very often. Can anyone
i get this error {Method 'System.DateTime ConvertTimeFromUtc(System.DateTime, System.TimeZoneInfo)' has no supported translation to SQL.}
I get this error message when installing SQL 2005 Analysis services. The cabinet File

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.