aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Christie2013-01-13 11:03:18 -0800
committerTom Christie2013-01-13 11:03:18 -0800
commitcae9a334ce1cb88b85d9619e473f7d4c550b68d5 (patch)
tree3ce17d86c89ca557a9c922e946a9d00755f5541d
parent9d47c32f444c7c1563d1686f8f397a97116d1f5e (diff)
parent08943c3e0aad30b2f9f6b8146daa80117b7adfb3 (diff)
downloaddjango-rest-framework-cae9a334ce1cb88b85d9619e473f7d4c550b68d5.tar.bz2
Merge pull request #578 from Wackerbarth/tutorial
Format extensions have already been introduced.
-rw-r--r--docs/tutorial/5-relationships-and-hyperlinked-apis.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/tutorial/5-relationships-and-hyperlinked-apis.md b/docs/tutorial/5-relationships-and-hyperlinked-apis.md
index c4c03495..27898f7b 100644
--- a/docs/tutorial/5-relationships-and-hyperlinked-apis.md
+++ b/docs/tutorial/5-relationships-and-hyperlinked-apis.md
@@ -15,8 +15,8 @@ Right now we have endpoints for 'snippets' and 'users', but we don't have a sing
@api_view(('GET',))
def api_root(request, format=None):
return Response({
- 'users': reverse('user-list', request=request),
- 'snippets': reverse('snippet-list', request=request)
+ 'users': reverse('user-list', request=request, format=format),
+ 'snippets': reverse('snippet-list', request=request, format=format)
})
Notice that we're using REST framework's `reverse` function in order to return fully-qualified URLs.