Code

Opened 4 years ago

Closed 4 years ago

#12839 closed (fixed)

csrf_exempt decorator

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

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

Attachments (0)

Change History (1)

comment:1 Changed 4 years ago by lukeplant

  • Resolution set to fixed
  • Status changed from new to closed

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

Thanks rubic for the report.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.