diff options
Diffstat (limited to 'docs/api-guide/parsers.md')
| -rw-r--r-- | docs/api-guide/parsers.md | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/api-guide/parsers.md b/docs/api-guide/parsers.md index 5bd79a31..1030fcb6 100644 --- a/docs/api-guide/parsers.md +++ b/docs/api-guide/parsers.md @@ -34,9 +34,13 @@ The default set of parsers may be set globally, using the `DEFAULT_PARSER_CLASSE ) } -You can also set the renderers used for an individual view, or viewset, +You can also set the parsers used for an individual view, or viewset, using the `APIView` class based views. + from rest_framework.parsers import YAMLParser + from rest_framework.response import Response + from rest_framework.views import APIView + class ExampleView(APIView): """ A view that can accept POST requests with YAML content. |
