I have just upgraded to Django 1.2 and I am trying to run my project. After I login I get
Forbidden (403)
CSRF verification failed. Request aborted.
which is strange bec开发者_如何学编程ause I haven't enabled CSRF protection previously. Do I have to configure something else to have my project work?
Yep, that's because you use contrib.admin view for login with a custom template. You should add csrf_token to your login template.
It seems, that CSRF protection is on for contrib.admin views, which I use for login. This is why I get 403.
精彩评论