mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 10:03:57 +03:00
Correct docs' incorrect usage of action decorator
If you don't call it, it doesn't work.
This commit is contained in:
parent
6d2ca75d8e
commit
f3529f1f4a
|
@ -108,7 +108,7 @@ For example:
|
||||||
queryset = User.objects.all()
|
queryset = User.objects.all()
|
||||||
serializer_class = UserSerializer
|
serializer_class = UserSerializer
|
||||||
|
|
||||||
@action
|
@action()
|
||||||
def set_password(self, request, pk=None):
|
def set_password(self, request, pk=None):
|
||||||
user = self.get_object()
|
user = self.get_object()
|
||||||
serializer = PasswordSerializer(data=request.DATA)
|
serializer = PasswordSerializer(data=request.DATA)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user