Tuesday, January 24, 2012

CsrfViewMiddleware from a xml post?

Hey Gang, is it possible to include a csrf token with a xml post?
It looks like there are options in the view to control this but
getting into the header would be nice.

This isn't working along with many other tries. Anyone know what the
header should look like this offhand?

xmlhttp.open("POST","/votingConfirm/",true);
xmlhttp.setRequestHeader("X-CSRFToken",
$("#csrfmiddlewaretoken").val());
xmlhttp.send("person="+person);


Thanks

--
Bust0ut Surgemcgee  ---
BudTVNetwork.com
RadioWeedShow.com
PBDefence.com
"Bringing entertainment to Unix"
"Finding the exit without looking"

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment