From a06f9c39066d417f45e633f15db2870594d9e311 Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Sun, 20 Jun 2010 00:14:15 +0200 Subject: [PATCH] add CSRF middlewares to avoid errors when submitting forms --- pyweb/settings.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyweb/settings.py b/pyweb/settings.py index cb822bb..7706bba 100644 --- a/pyweb/settings.py +++ b/pyweb/settings.py @@ -207,6 +207,8 @@ TEMPLATE_LOADERS = ( MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.middleware.csrf.CsrfResponseMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', )