Opened 10 years ago

Closed 10 years ago

#12839 closed (fixed)

csrf_exempt decorator

Reported by: Jeff Bauer Owned by: nobody
Component: Documentation Version: 1.1
Severity: Keywords: csrf
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Documentation states:

New in Django 1.1
To manually exclude a view function from being handled by either of the two CSRF middleware, you can use the csrf_exempt decorator ...

from django.views.decorators.csrf import csrf_exempt

But attempting to import the decorator:

>>> import django
>>> django.get_version()
>>> from django.views.decorators.csrf import csrf_exempt
ImportError: No module named csrf

Change History (1)

comment:1 Changed 10 years ago by Luke Plant

Resolution: fixed
Status: newclosed

(In [12407]) Fixed #12839 - noted change of import path for csrf_exempt decorator

Thanks rubic for the report.

Note: See TracTickets for help on using tickets.
Back to Top