mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-24 00:04:16 +03:00
Adding imports to docs
This commit is contained in:
parent
bbe5044c04
commit
9a778793f8
|
@ -88,7 +88,9 @@ using the `APIView` class based views.
|
||||||
|
|
||||||
Or, if you're using the `@api_view` decorator with function based views.
|
Or, if you're using the `@api_view` decorator with function based views.
|
||||||
|
|
||||||
from rest_framework.decorators import permission_classes
|
from rest_framework.decorators import api_view, permission_classes
|
||||||
|
from rest_framework.permissions import IsAuthenticated
|
||||||
|
from rest_framework.response import Response
|
||||||
|
|
||||||
@api_view('GET')
|
@api_view('GET')
|
||||||
@permission_classes((IsAuthenticated, ))
|
@permission_classes((IsAuthenticated, ))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user