[Fixed]-How to access named url arguments in permissions with Django REST Framework?

11👍

This is the wrong approach. Rather than trying to access keyword arguments there, you should be using object-level permissions and checking has_object_permission in your permission class.

22👍

you can access from the view.kwargs.

7👍

You can find them in:

request.resolver_match.kwargs.get('attribute_name')

Leave a comment