title: Ajax CSRF problem in Django 1.3
body: <p>According to django documentation, for ajax post request in 1.3 (at least with Jquery), we just need to add this <a href="http://docs.djangoproject.com/en/1.3/ref/contrib/csrf/#ajax" rel="noreferrer">snippet</a> to main js file. This snippet get csrftoken from cookies, and then set up it for all ajax request. That's work, but what if csrftoken don't exist in cookies? I thought render_to_response and render both automatically checks if csrftoken in sessions, and set it for us, if token not there. But they are not. So, i need to implement it by myself? Or maybe there is another way to handle ajax csrf protection?</p>