javascript - send ajax to a django application from static html with CSRF -
i want submit form in html static page , send data django application, using jquery $.ajax
function. how can add csrf token form accepted django?
in form use {% csrf_token %} (in usual manner), , on ajax call , pass $(form).serialize() data. that's it.
Comments
Post a Comment