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
django-polymorphic questions #462
Comments
Hello, It is a django-polymorphic issue specific. Greetings, CC: @benkonrath |
Regarding issues of versioning is pleased to announce that it accepts the attention. In the next releases will be corrected. |
@BenDevelopment The function to retrieve the base model content type was only recently merged into django-polymorphic. Using the base model content type will make the guardian permissions work on the base model. You just need to add this setting if you're using the latest released version of django-guardian and the latest version of django-polymorphic from git:
You can also copy & paste the Here are the unreleased docs: https://django-polymorphic.readthedocs.io/en/latest/third-party.html#django-guardian-support |
@BenDevelopment Correction, the setting should be:
I'm going to make a PR to polymorphic to fix this in the docs. |
Thank you guys! All works well 👍 💯 ! |
I've seen many discussions about django-guardian use with django-polymorphic, but it's verry confusing for me.
Imagine this case:
With django-guardian 1.4.6, when you set permisssions to ArticleFeedPost, these permissions doesn't apply to FeedPost.
In the doc, there is this about polymorphic objects:
http://django-guardian.readthedocs.io/en/stable/configuration.html?highlight=polymorph#guardian-get-content-type
But there is no example describing how to use get_default_content_type.
My questions are (by the way, I'm sorry to ask these questions here, but I have a better chance to have a reply here than elsewhere):
The text was updated successfully, but these errors were encountered: