From patchwork Wed Apr 6 15:28:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Just add a comment on settings.py with instructions to enable CSRF protection on Django 1.1 Date: Wed, 06 Apr 2011 05:28:48 -0000 From: Guilherme Salgado X-Patchwork-Id: 90033 Message-Id: <20110406152848.8420.31736.stgit@localhost6.localdomain6> To: patchwork@lists.ozlabs.org Cc: patches@linaro.org Signed-off-by: Guilherme Salgado --- apps/settings.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/apps/settings.py b/apps/settings.py index 68837b3..10813d4 100644 --- a/apps/settings.py +++ b/apps/settings.py @@ -63,6 +63,9 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', + # If using Django 1.1, instead of the line above you'll need: + # 'django.contrib.csrf.CsrfViewMiddleware', + # 'django.contrib.csrf.CsrfResponseMiddleware', ) ROOT_URLCONF = 'apps.urls'