1
1
mirror of https://github.com/encode/django-rest-framework.git synced 2025-07-26 16:09:49 +03:00

Merge pull request from karthik-suresh/Fixes-Issue3727

Import parser added to docs in API guide
This commit is contained in:
Xavier Ordoquy 2015-12-12 22:19:13 +01:00
commit dcaff71217

View File

@ -52,6 +52,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 api_view
from rest_framework.decorators import parser_classes
@api_view(['POST']) @api_view(['POST'])
@parser_classes((JSONParser,)) @parser_classes((JSONParser,))
def example_view(request, format=None): def example_view(request, format=None):