Skip to content

Commit b739dff

Browse files
authored
Update docs/api-guide/viewsets.md
1 parent 117c774 commit b739dff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/api-guide/viewsets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ You may inspect these attributes to adjust behavior based on the current action.
128128
permission_classes = [IsAdminUser]
129129
return [permission() for permission in permission_classes]
130130

131-
**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.
131+
**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.
132132

133133
## Marking extra actions for routing
134134

0 commit comments

Comments
 (0)