Browse Source

add CSRF middlewares to avoid errors when submitting forms

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
a06f9c3906
  1. 2
      pyweb/settings.py

2
pyweb/settings.py

@ -207,6 +207,8 @@ TEMPLATE_LOADERS = (
MIDDLEWARE_CLASSES = ( MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware', 'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.csrf.CsrfResponseMiddleware',
'django.middleware.locale.LocaleMiddleware', 'django.middleware.locale.LocaleMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',
) )

Loading…
Cancel
Save