#15354: Cookie with CSRF token not always available for AJAX Post requests
------------------------------------+------------------------------
Reporter: sayane | Owner: nobody
Type: Bug | Status: closed
Milestone: 1.3 | Component: contrib.csrf
Version: SVN | Severity: Normal
Resolution: fixed | Keywords:
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
------------------------------------+------------------------------
Comment (by anonymous):
Couldn't you just use:
from django.middleware.csrf import get_token
def some_view(request):
get_token(request)
seems simpler than a decorator.
--
Ticket URL: <https://code.djangoproject.com/ticket/15354#comment:10>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.