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

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -