aboutsummaryrefslogtreecommitdiffstats
path: root/api-guide/renderers.html
diff options
context:
space:
mode:
authorTom Christie2014-06-12 12:22:09 +0100
committerTom Christie2014-06-12 12:22:09 +0100
commit106c8db6f5cacf1e37978d5cf13c9fde3ca29ce9 (patch)
tree6cc268279408148a61c95a63cad523dc0e6589a4 /api-guide/renderers.html
parent03ddd237c93ea5b9159260c49fd856595dbea53c (diff)
downloaddjango-rest-framework-106c8db6f5cacf1e37978d5cf13c9fde3ca29ce9.tar.bz2
Latest docs build
Diffstat (limited to 'api-guide/renderers.html')
-rw-r--r--api-guide/renderers.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/api-guide/renderers.html b/api-guide/renderers.html
index 80dd5fe6..75b8aee5 100644
--- a/api-guide/renderers.html
+++ b/api-guide/renderers.html
@@ -177,6 +177,7 @@
<li><a href="#unicodejsonrenderer">UnicodeJSONRenderer</a></li>
<li><a href="#jsonprenderer">JSONPRenderer</a></li>
<li><a href="#yamlrenderer">YAMLRenderer</a></li>
+<li><a href="#unicodeyamlrenderer">UnicodeYAMLRenderer</a></li>
<li><a href="#xmlrenderer">XMLRenderer</a></li>
<li><a href="#templatehtmlrenderer">TemplateHTMLRenderer</a></li>
<li><a href="#statichtmlrenderer">StaticHTMLRenderer</a></li>
@@ -303,6 +304,18 @@ def user_count_view(request, format=None):
<h2 id="yamlrenderer">YAMLRenderer</h2>
<p>Renders the request data into <code>YAML</code>. </p>
<p>Requires the <code>pyyaml</code> package to be installed.</p>
+<p>Note that non-ascii characters will be rendered using <code>\uXXXX</code> character escape. For example:</p>
+<pre class="prettyprint lang-py"><code>unicode black star: "\u2605"
+</code></pre>
+<p><strong>.media_type</strong>: <code>application/yaml</code></p>
+<p><strong>.format</strong>: <code>'.yaml'</code></p>
+<p><strong>.charset</strong>: <code>utf-8</code></p>
+<h2 id="unicodeyamlrenderer">UnicodeYAMLRenderer</h2>
+<p>Renders the request data into <code>YAML</code>. </p>
+<p>Requires the <code>pyyaml</code> package to be installed.</p>
+<p>Note that non-ascii characters will not be character escaped. For example:</p>
+<pre class="prettyprint lang-py"><code>unicode black star: ★
+</code></pre>
<p><strong>.media_type</strong>: <code>application/yaml</code></p>
<p><strong>.format</strong>: <code>'.yaml'</code></p>
<p><strong>.charset</strong>: <code>utf-8</code></p>