import permission_classes

many people don't know how to import permission_classes
This commit is contained in:
wwj718 2015-08-06 11:08:56 +08:00
parent f7d44dfae0
commit c099d9aac4

View File

@ -88,6 +88,8 @@ using the `APIView` class based views.
Or, if you're using the `@api_view` decorator with function based views.
from rest_framework.decorators import permission_classes
@api_view('GET')
@permission_classes((IsAuthenticated, ))
def example_view(request, format=None):