Correct docs' incorrect usage of action decorator

If you don't call it, it doesn't work.
This commit is contained in:
Philip Douglas 2013-06-21 16:26:28 +01:00
parent 6d2ca75d8e
commit f3529f1f4a

View File

@ -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)