mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-16 19:22:24 +03:00
Update docs/api-guide/viewsets.md
This commit is contained in:
parent
117c77400b
commit
b739dff200
|
@ -128,7 +128,7 @@ You may inspect these attributes to adjust behavior based on the current action.
|
||||||
permission_classes = [IsAdminUser]
|
permission_classes = [IsAdminUser]
|
||||||
return [permission() for permission in permission_classes]
|
return [permission() for permission in permission_classes]
|
||||||
|
|
||||||
**Note**: don't use the `action` attribute in the `get_parsers`, `get_authenticators` or `get_content_negotiator` methods, otherwise you will get an `AttributeError` error.
|
**Note**: the `action` attribute is not available in the `get_parsers`, `get_authenticators` and `get_content_negotiator` methods, as it is set _after_ they are called in the framework lifecycle. If you override one of these methods and try to access the `action` attribute in them, you will get an `AttributeError` error.
|
||||||
|
|
||||||
## Marking extra actions for routing
|
## Marking extra actions for routing
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user