why following jquery code doesn't work when used with django while it works if loaded like static page?
there's probably django's csrf protection involved somewhere, but i can't find how to make it work.
edited, stripped down code:
$(document).ready(function(){
$('.content').load('something.txt');
$.ajax({
method: "get",url: "http://something.com/pm/js/something.txt",
success: function(html)
{
$(".content").html(html);
}
});
});
the purpose of this should be: when this django page loads, the script should call another django view(s) and load data from them. (at this moment to make it easier 'something.txt' is static file)
...firebug doesn't show anything abnormal