From 26e9f3974877c939046b1b6ef4e4a8a2740380e9 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Thu, 24 Apr 2014 23:20:25 +0200 Subject: [PATCH] Better order for middleware See https://docs.djangoproject.com/en/1.6/topics/i18n/translation/#how-django-discovers-language-preference --- umap/settings/base.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/umap/settings/base.py b/umap/settings/base.py index d99ed112..73513c4d 100644 --- a/umap/settings/base.py +++ b/umap/settings/base.py @@ -135,8 +135,13 @@ TEMPLATE_LOADERS = ( # Middleware #============================================================================== -MIDDLEWARE_CLASSES += ( +MIDDLEWARE_CLASSES = ( + 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.http.ConditionalGetMiddleware', )