aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/authentication.md
diff options
context:
space:
mode:
authorTom Christie2012-10-05 14:22:02 +0100
committerTom Christie2012-10-05 14:22:02 +0100
commit3e862c77379b2f84356e2e8f0be20b7aca5b9e89 (patch)
tree73b42ff68ddf94ead735b808eaa9bf567f86b04a /docs/api-guide/authentication.md
parent6a15556384c48984868493b6b38a7afa61d77a3a (diff)
downloaddjango-rest-framework-3e862c77379b2f84356e2e8f0be20b7aca5b9e89.tar.bz2
Tweak view slightly
Diffstat (limited to 'docs/api-guide/authentication.md')
-rw-r--r--docs/api-guide/authentication.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/api-guide/authentication.md b/docs/api-guide/authentication.md
index c6995360..ae21c66e 100644
--- a/docs/api-guide/authentication.md
+++ b/docs/api-guide/authentication.md
@@ -50,9 +50,9 @@ You can also set the authentication policy on a per-view basis, using the `APIVi
Or, if you're using the `@api_view` decorator with function based views.
- @api_view('GET'),
- @authentication_classes(SessionAuthentication, UserBasicAuthentication)
- @permissions_classes(IsAuthenticated)
+ @api_view(('GET',)),
+ @authentication_classes((SessionAuthentication, UserBasicAuthentication))
+ @permissions_classes((IsAuthenticated,))
def example_view(request, format=None):
content = {
'user': unicode(request.user), # `django.contrib.auth.User` instance.