How can I use the jquery.post()
method in Django?
This is what I am trying to do:
var postdata={
'username':$('#login-email').val(),
'password':$('#login-password').val()
}
$.post('/login/',postdata)
How do I CSRF protect this in django? Is there a way to add to the CSRF token to the post data?