From de9572895e047cc77a2851b7eb21729e44477940 Mon Sep 17 00:00:00 2001 From: Hidden Z Date: Sun, 29 Sep 2013 06:36:37 +0000 Subject: [PATCH] settings.py: update translations setup according to django 1.5 --- pyi2phosts/settings.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pyi2phosts/settings.py b/pyi2phosts/settings.py index 324eecd..3e57eb7 100644 --- a/pyi2phosts/settings.py +++ b/pyi2phosts/settings.py @@ -76,6 +76,11 @@ STATICFILES_DIRS = ( os.path.join(PROJECT_ROOT, "static-common"), ) +# Directories where Django looks for translation files +LOCALE_PATHS = ( + os.path.join(PROJECT_ROOT, "locale"), +) + # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', @@ -84,12 +89,12 @@ TEMPLATE_LOADERS = ( ) MIDDLEWARE_CLASSES = ( - 'django.middleware.common.CommonMiddleware', '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.locale.LocaleMiddleware', ) ROOT_URLCONF = 'pyi2phosts.urls'