mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-30 18:09:59 +03:00
Documentation: improve the action decorator documentation (#7316)
This commit is contained in:
parent
7077943d19
commit
c33599c162
|
@ -179,7 +179,7 @@ The `action` decorator will route `GET` requests by default, but may also accept
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
The decorator allows you to override any viewset-level `*_classes` such as `render_classes` or `permission_classes`:
|
The decorator allows you to override any viewset-level configuration such as `permission_classes`, `serializer_class`, `filter_backends`...:
|
||||||
|
|
||||||
@action(detail=True, methods=['post'], permission_classes=[IsAdminOrIsSelf])
|
@action(detail=True, methods=['post'], permission_classes=[IsAdminOrIsSelf])
|
||||||
def set_password(self, request, pk=None):
|
def set_password(self, request, pk=None):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user