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

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -