Opened 15 years ago
Closed 15 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 |
Description
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() '1.1.1' >>> from django.views.decorators.csrf import csrf_exempt ImportError: No module named csrf
Note:
See TracTickets
for help on using tickets.
(In [12407]) Fixed #12839 - noted change of import path for csrf_exempt decorator
Thanks rubic for the report.