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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -