From d372ccca02008a506b4f1e3e855367b8a10a33df Mon Sep 17 00:00:00 2001 From: Liping Wang <1325266543@qq.com> Date: Mon, 29 Feb 2016 19:51:33 +0800 Subject: [PATCH 1/2] [FIX] "@api_view" calling error. "@api_view" usage error. --- docs/tutorial/5-relationships-and-hyperlinked-apis.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/5-relationships-and-hyperlinked-apis.md b/docs/tutorial/5-relationships-and-hyperlinked-apis.md index feef1fcf0..fb5f62fd3 100644 --- a/docs/tutorial/5-relationships-and-hyperlinked-apis.md +++ b/docs/tutorial/5-relationships-and-hyperlinked-apis.md @@ -11,7 +11,7 @@ Right now we have endpoints for 'snippets' and 'users', but we don't have a sing from rest_framework.reverse import reverse - @api_view(('GET',)) + @api_view(['GET',]) def api_root(request, format=None): return Response({ 'users': reverse('user-list', request=request, format=format), From c3cea1499f120b63dbd8928f718519a4ede57434 Mon Sep 17 00:00:00 2001 From: Liping Wang <1325266543@qq.com> Date: Tue, 1 Mar 2016 15:46:20 +0800 Subject: [PATCH 2/2] remove comma remove comma --- docs/tutorial/5-relationships-and-hyperlinked-apis.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/5-relationships-and-hyperlinked-apis.md b/docs/tutorial/5-relationships-and-hyperlinked-apis.md index fb5f62fd3..4b9347bfa 100644 --- a/docs/tutorial/5-relationships-and-hyperlinked-apis.md +++ b/docs/tutorial/5-relationships-and-hyperlinked-apis.md @@ -11,7 +11,7 @@ Right now we have endpoints for 'snippets' and 'users', but we don't have a sing from rest_framework.reverse import reverse - @api_view(['GET',]) + @api_view(['GET']) def api_root(request, format=None): return Response({ 'users': reverse('user-list', request=request, format=format),