diff options
| author | Tom Christie | 2013-07-15 21:23:34 +0100 | 
|---|---|---|
| committer | Tom Christie | 2013-07-15 21:23:34 +0100 | 
| commit | 3eaad89c160c478e3706206535929ad0658ae8c5 (patch) | |
| tree | 0f9e70abc4d83a8f4f7d1381eaeca28acf4be094 /docs/api-guide/viewsets.md | |
| parent | ce5e8f8946d2fae416425d8d03af6d61380dc198 (diff) | |
| download | django-rest-framework-3eaad89c160c478e3706206535929ad0658ae8c5.tar.bz2 | |
Docs fix
Diffstat (limited to 'docs/api-guide/viewsets.md')
| -rw-r--r-- | docs/api-guide/viewsets.md | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/docs/api-guide/viewsets.md b/docs/api-guide/viewsets.md index 17c528b3..47e59e2b 100644 --- a/docs/api-guide/viewsets.md +++ b/docs/api-guide/viewsets.md @@ -99,7 +99,8 @@ For example:      from django.contrib.auth.models import User      from rest_framework import viewsets      from rest_framework.decorators import action -    from myapp.serializers import UserSerializer +    from rest_framework.response import Response +    from myapp.serializers import UserSerializer, PasswordSerializer      class UserViewSet(viewsets.ModelViewSet):          """ @@ -176,7 +177,7 @@ Note that you can use any of the standard attributes or method overrides provide          permission_classes = [IsAccountAdminOrReadOnly]          def get_queryset(self): -            return request.user.accounts.all() +            return self.request.user.accounts.all()  Also note that although this class provides the complete set of create/list/retrieve/update/destroy actions by default, you can restrict the available operations by using the standard permission classes. | 
