csrf with ajax and django post
问题 Using jquery1.7.1 and django1.3 ,I was trying to make a post request through ajax,in some tutorial code I found on web $(document).ready(function(){ $("#create").click(create_note); }); var create_note = function() { var title = $("#title").val() var slug = $("#slug").val() if (title != "" && slug != "") { var data = { title:title, slug:slug }; console.log('title='+title); console.log('slug='+slug); var args = { type:"POST", url:"/create/", data:data, complete:done }; $.ajax(args); } else { /