Search code examples
djangocsrf

django: after upgrade to 1.2 CSRF raises 403 though I don't have CSRF protection enabled


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 because I haven't enabled CSRF protection previously. Do I have to configure something else to have my project work?


Solution

  • Yep, that's because you use contrib.admin view for login with a custom template. You should add csrf_token to your login template.