Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syncdb throws error: "gatekeeper.moderatedobject: Accessor for field 'content_type' clashes with related field 'ContentType.moderatedobject_set'. Add a related_name argument to the definition for 'content_type'." #10

Open
alp82 opened this issue Jun 25, 2012 · 1 comment

Comments

@alp82
Copy link

alp82 commented Jun 25, 2012

If i run python manage.py syncdb i get the following error:

Error: One or more models did not validate:
gatekeeper.moderatedobject: Accessor for field 'content_type' clashes with related field 'ContentType.moderatedobject_set'. Add a related_name argument to the definition for 'content_type'.

Any idea why? (Using the current version 0.4.0a)

@alp82
Copy link
Author

alp82 commented Jun 25, 2012

I fixed it by adding a related_name to the content_type attribute of ModeratedObject.

File: gatekeeper.models
Class: ModeratedObject
Line: 43

old line:

content_type = models.ForeignKey(ContentType)

fixed line

content_type = models.ForeignKey(ContentType, related_name='moderated_content_type')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant