I have come to the frightning conclusion that it might not be possible to use ajax and django as far as the csrf protection is concerned:
def my_view(request):
c = {}
c.update(csrf(request))
return render_to_response("a_template.html", c)
That's the example from django. However, if I do render_to_response, that will reload the page which makes ajax useless.
Is there a way to get around this?