-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Add drf-psq package to docs #7451
Conversation
Anyone?!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @AminHP. I'm hesitant to merge this, as the description doesn't make much sense, specifically:
support for having view-based permission_classes, serializer_class, and queryset.
These are already attributes of the view, so they're already "view-based". Looking at the project, it looks like you've instead made querysets/serializers dependent on permission-based rules, with the ability to change these per handler (list, retrieve, create, etc..)?
Does that more accurately reflect what psq does?
Well, your description is what exactly psq does. But, I think in some way those attributes are not "view-based"; because when you have multiple handlers in a class, they can't have their own serializer/queryset/permission_class. So, they are somehow "class-based" and that's why I chose this description. |
The description is at odds with established Django/DRF terminology. A View class is considered a view, even if it has handlers for multiple HTTP methods. So, saying that psq provides view-based attributes is incorrect. It might be better to instead emphasize that the psq enables per-action attributes for a viewset. |
So, changing the description as below will solve the problem, right? drf-psq is an extension for the Django REST framework that gives support for having action-based permission_classes, serializer_class, and queryset dependent on permission-based rules. |
Yup, that would make much more sense from my point of view. 👍 |
Thanks for your review. We will apply the changes soon. |
this package is an extension that gives support for having action-based **permission_classes**, **serializer_class**, and **queryset** dependent on permission-based rules.
* Add drf-psq to third party packages * Add drf-psq to permissions.md this package is an extension that gives support for having action-based **permission_classes**, **serializer_class**, and **queryset** dependent on permission-based rules. Co-authored-by: Salar Nasiri <[email protected]>
Please checkout our extension for the Django REST framework.
https://github.com/drf-psq/drf-psq/