aboutsummaryrefslogtreecommitdiffstats
path: root/tutorial/5-relationships-and-hyperlinked-apis.html
diff options
context:
space:
mode:
authorTom Christie2014-08-12 14:49:18 +0100
committerTom Christie2014-08-12 14:49:18 +0100
commit0ed41c60de9d9f5d56c6a172af810e589a646702 (patch)
treecf28e072afd8e44608142459b2df6bf0d3e47a25 /tutorial/5-relationships-and-hyperlinked-apis.html
parent3f6137116f1e712b56d61f11fb06ea9792df193e (diff)
downloaddjango-rest-framework-0ed41c60de9d9f5d56c6a172af810e589a646702.tar.bz2
Latest sponsor updates
Diffstat (limited to 'tutorial/5-relationships-and-hyperlinked-apis.html')
-rw-r--r--tutorial/5-relationships-and-hyperlinked-apis.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/tutorial/5-relationships-and-hyperlinked-apis.html b/tutorial/5-relationships-and-hyperlinked-apis.html
index 72a2319b..ae1f9bd2 100644
--- a/tutorial/5-relationships-and-hyperlinked-apis.html
+++ b/tutorial/5-relationships-and-hyperlinked-apis.html
@@ -223,7 +223,7 @@ def api_root(request, format=None):
<p>The other obvious thing that's still missing from our pastebin API is the code highlighting endpoints.</p>
<p>Unlike all our other API endpoints, we don't want to use JSON, but instead just present an HTML representation. There are two styles of HTML renderer provided by REST framework, one for dealing with HTML rendered using templates, the other for dealing with pre-rendered HTML. The second renderer is the one we'd like to use for this endpoint.</p>
<p>The other thing we need to consider when creating the code highlight view is that there's no existing concrete generic view that we can use. We're not returning an object instance, but instead a property of an object instance.</p>
-<p>Instead of using a concrete generic view, we'll use the base class for representing instances, and create our own <code>.get()</code> method. In your snippets.views add:</p>
+<p>Instead of using a concrete generic view, we'll use the base class for representing instances, and create our own <code>.get()</code> method. In your <code>snippets.views</code> add:</p>
<pre class="prettyprint lang-py"><code>from rest_framework import renderers
from rest_framework.response import Response