mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 01:57:00 +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()
|
||||
serializer_class = UserSerializer
|
||||
|
||||
@action
|
||||
@action()
|
||||
def set_password(self, request, pk=None):
|
||||
user = self.get_object()
|
||||
serializer = PasswordSerializer(data=request.DATA)
|
||||
|
|
Loading…
Reference in New Issue
Block a user