mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
Import parser added to docs in API guide
Added missing import statements in code snippet of API guide. Closes-Issue: #3727
This commit is contained in:
parent
8dea1aeed0
commit
82973cfa32
|
@ -51,6 +51,9 @@ using the `APIView` class based views.
|
|||
return Response({'received data': request.data})
|
||||
|
||||
Or, if you're using the `@api_view` decorator with function based views.
|
||||
|
||||
from rest_framework.decorators import api_view
|
||||
from rest_framework.decorators import parser_classes
|
||||
|
||||
@api_view(['POST'])
|
||||
@parser_classes((JSONParser,))
|
||||
|
|
Loading…
Reference in New Issue
Block a user