right there in the code sample you quoted:
xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'));
where getCookie() is defined as:
function getCookie(name) { var cookieValue = null;
if (document.cookie && document.cookie != '') { var cookies
= document.cookie.split(';'); for (var i = 0; i <
cookies.length; i++) { var cookie =
jQuery.trim(cookies[i]); // Does this cookie string
begin with the name we want? if (cookie.substring(0,
name.length + 1) == (name + '=')) { cookieValue =
decodeURIComponent(cookie.substring(name.length + 1));
break; } } } return
cookieValue; }
--
Javier
have you read it?
--
Javier
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.