Skip to content

Commit

Permalink
Use decorator syntax for csrf_exempt example.
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11663 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
spookylukey committed Oct 27, 2009
1 parent 7230a99 commit 64b4ab1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/ref/contrib/csrf.txt
Expand Up @@ -212,9 +212,9 @@ middleware, you can use the ``csrf_exempt`` decorator, found in the


from django.views.decorators.csrf import csrf_exempt from django.views.decorators.csrf import csrf_exempt


@csrf_exempt
def my_view(request): def my_view(request):
return HttpResponse('Hello world') return HttpResponse('Hello world')
my_view = csrf_exempt(my_view)


Like the middleware, the ``csrf_exempt`` decorator is composed of two parts: a Like the middleware, the ``csrf_exempt`` decorator is composed of two parts: a
``csrf_view_exempt`` decorator and a ``csrf_response_exempt`` decorator, found ``csrf_view_exempt`` decorator and a ``csrf_response_exempt`` decorator, found
Expand Down

0 comments on commit 64b4ab1

Please sign in to comment.