I don\'t have this problem on my local development environment, but I just deployed the app with nginx + gunicorn (first time deploying an app) and I am getting this traceba
In Django 1.4, you should remove the 'django.middleware.csrf.CsrfResponseMiddleware
', because it can cause security problems.
Furthermore, two things must be done.
{% csrf_token %}
tag to your post form. RequestContext
instead of Context
in all of your relative views.py files.Looks like the server where you deployed has different version of Django (old one). Also Penthi is right, CsrfResponseMiddleware
is for backward compatibility and should be removed. https://docs.djangoproject.com/en/1.3/ref/contrib/csrf/#legacy-method.
In Django 1.3, I have only django.middleware.csrf.CsrfViewMiddleware in my middlewares to get CSRF protection working