Skip to content

Commit 9a77879

Browse files
committed
Adding imports to docs
1 parent bbe5044 commit 9a77879

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/api-guide/permissions.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ You can also set the authentication policy on a per-view, or per-viewset basis,
7474
using the `APIView` class based views.
7575

7676
from rest_framework.permissions import IsAuthenticated
77-
from rest_framework.response import Response
78-
from rest_framework.views import APIView
77+
from rest_framework.response import Response
78+
from rest_framework.views import APIView
7979

8080
class ExampleView(APIView):
8181
permission_classes = (IsAuthenticated,)
@@ -88,8 +88,10 @@ using the `APIView` class based views.
8888

8989
Or, if you're using the `@api_view` decorator with function based views.
9090

91-
from rest_framework.decorators import permission_classes
92-
91+
from rest_framework.decorators import api_view, permission_classes
92+
from rest_framework.permissions import IsAuthenticated
93+
from rest_framework.response import Response
94+
9395
@api_view('GET')
9496
@permission_classes((IsAuthenticated, ))
9597
def example_view(request, format=None):

0 commit comments

Comments
 (0)