From c099d9aac4dce2ba3b2cca440bd7f8a3d368958f Mon Sep 17 00:00:00 2001 From: wwj718 Date: Thu, 6 Aug 2015 11:08:56 +0800 Subject: [PATCH] import permission_classes many people don't know how to import permission_classes --- docs/api-guide/permissions.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/api-guide/permissions.md b/docs/api-guide/permissions.md index a78334ea1..73821d557 100644 --- a/docs/api-guide/permissions.md +++ b/docs/api-guide/permissions.md @@ -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):