[PATCH] Just add a comment on settings.py with instructions to enable CSRF protection on Django 1.1

Guilherme Salgado guilherme.salgado at linaro.org
Thu Apr 7 01:28:48 EST 2011


Signed-off-by: Guilherme Salgado <guilherme.salgado at linaro.org>
---
 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'



More information about the Patchwork mailing list