aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/parsers.md
diff options
context:
space:
mode:
authorTom Christie2013-08-21 21:31:59 +0100
committerTom Christie2013-08-21 21:31:59 +0100
commit16ffdedd14ed842eb019414566705d8b8392ea63 (patch)
treecd6fe551725d60b86a57ea5812f60f054e7c1f17 /docs/api-guide/parsers.md
parent44ceef841543877a700c3fb4a0f84dfecbad0cbb (diff)
parent2bcad32dcb57ae9419f6a901e081f0dcdc1a6f87 (diff)
downloaddjango-rest-framework-16ffdedd14ed842eb019414566705d8b8392ea63.tar.bz2
Merge master
Diffstat (limited to 'docs/api-guide/parsers.md')
-rw-r--r--docs/api-guide/parsers.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/api-guide/parsers.md b/docs/api-guide/parsers.md
index 5bd79a31..d3c42b1c 100644
--- a/docs/api-guide/parsers.md
+++ b/docs/api-guide/parsers.md
@@ -37,6 +37,10 @@ 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,
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.