I am testing out ajax with Django + jQuery. I have this in my views:
def ajax_test(request): if request.is_ajax(): message = \"This is ajax\"
Probably you've got APPEND_SLASH turned on (the default), and Django is redirecting from /ajax_test to /ajax_test/ but not preserving the relevant header. Better to request the version with the slash in the first place.
/ajax_test
/ajax_test/