Mercurial > public > sg101
comparison gpp/settings.py @ 194:6a5549c2efb5
Implement #62, add support for CSRF protection.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 03 Apr 2010 20:00:56 +0000 |
parents | db202792d9f5 |
children | 272d3a8c98e8 |
comparison
equal
deleted
inserted
replaced
193:fa7d82bfb100 | 194:6a5549c2efb5 |
---|---|
74 ) | 74 ) |
75 | 75 |
76 if DEBUG: | 76 if DEBUG: |
77 MIDDLEWARE_CLASSES = ( | 77 MIDDLEWARE_CLASSES = ( |
78 'django.middleware.common.CommonMiddleware', | 78 'django.middleware.common.CommonMiddleware', |
79 'django.middleware.csrf.CsrfViewMiddleware', | |
79 'django.contrib.sessions.middleware.SessionMiddleware', | 80 'django.contrib.sessions.middleware.SessionMiddleware', |
80 'django.contrib.messages.middleware.MessageMiddleware', | 81 'django.contrib.messages.middleware.MessageMiddleware', |
81 'debug_toolbar.middleware.DebugToolbarMiddleware', | 82 'debug_toolbar.middleware.DebugToolbarMiddleware', |
82 'django.contrib.auth.middleware.AuthenticationMiddleware', | 83 'django.contrib.auth.middleware.AuthenticationMiddleware', |
83 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', | 84 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', |
84 'gpp.forums.middleware.WhosOnline', | 85 'gpp.forums.middleware.WhosOnline', |
85 ) | 86 ) |
86 else: | 87 else: |
87 MIDDLEWARE_CLASSES = ( | 88 MIDDLEWARE_CLASSES = ( |
88 'django.middleware.common.CommonMiddleware', | 89 'django.middleware.common.CommonMiddleware', |
90 'django.middleware.csrf.CsrfViewMiddleware', | |
89 'django.contrib.sessions.middleware.SessionMiddleware', | 91 'django.contrib.sessions.middleware.SessionMiddleware', |
90 'django.contrib.messages.middleware.MessageMiddleware', | 92 'django.contrib.messages.middleware.MessageMiddleware', |
91 'django.contrib.auth.middleware.AuthenticationMiddleware', | 93 'django.contrib.auth.middleware.AuthenticationMiddleware', |
92 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', | 94 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', |
93 'gpp.forums.middleware.WhosOnline', | 95 'gpp.forums.middleware.WhosOnline', |