django - CSRF Token in Phonegap using AJAX -
i'm developing app phonegap
uses django back-end. back-end uses csrf
, need phonegap
app use csrf
can work django
.
i've read can use csrf
via ajax, haven't been able make work.
could please tell me example how can this?
just catch csrf_token in html page in script tag @ time of document ready
var csrf = {{ csrf_token }}
and via ajax pass parameter in js file
$.ajax({
csrfmiddlewaretoken: csrf; ..//
});
Comments
Post a Comment