-
-
Save reuf/af8403940ab48baa591b to your computer and use it in GitHub Desktop.
django ajax csft token
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//query | |
$.ajax({ | |
data: 'csrfmiddlewaretoken={{ csrf_token }}&..., | |
type: 'post', | |
}); | |
//json | |
$.ajax({ | |
data: {'csrfmiddlewaretoken': '{{ csrf_token }}', ...}, | |
type: 'post', | |
dataType: 'json', | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment