From patchwork Wed Apr 6 15:28:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guilherme Salgado X-Patchwork-Id: 90033 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id D5B4A1007D9 for ; Thu, 7 Apr 2011 01:28:57 +1000 (EST) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by ozlabs.org (Postfix) with ESMTP id 49257B6EF1 for ; Thu, 7 Apr 2011 01:28:55 +1000 (EST) Received: from youngberry.canonical.com ([91.189.89.112]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Q7Uf7-0005ff-9P; Wed, 06 Apr 2011 15:28:53 +0000 Received: from [187.126.166.24] (helo=feioso) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1Q7Uf6-00025b-Vo; Wed, 06 Apr 2011 15:28:53 +0000 Received: from localhost6.localdomain6 (localhost.localdomain [127.0.0.1]) by feioso (Postfix) with ESMTP id CF17041902; Wed, 6 Apr 2011 12:28:48 -0300 (BRT) Subject: [PATCH] Just add a comment on settings.py with instructions to enable CSRF protection on Django 1.1 To: patchwork@lists.ozlabs.org From: Guilherme Salgado Date: Wed, 06 Apr 2011 12:28:48 -0300 Message-ID: <20110406152848.8420.31736.stgit@localhost6.localdomain6> User-Agent: StGit/0.15 MIME-Version: 1.0 Cc: patches@linaro.org X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.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'