Merge pull request #1148 from thedrow/patch-1

Fixed code example.
This commit is contained in:
Tom Christie 2013-10-03 08:39:19 -07:00
commit 36046168b6

View File

@ -45,6 +45,9 @@ For example, given a method like this on the `UserViewSet` class:
from myapp.permissions import IsAdminOrIsSelf
from rest_framework.decorators import detail_route
class UserViewSet(ModelViewSet):
...
@detail_route(methods=['post'], permission_classes=[IsAdminOrIsSelf])
def set_password(self, request, pk=None):
...