Port django.middleware.locale.LocaleMiddleware from Django 1.8

This commit is contained in:
Sarina Canelake
2015-06-05 13:29:15 -04:00
parent 033d36c8f5
commit df0c56dde3
6 changed files with 384 additions and 2 deletions

View File

@@ -308,7 +308,9 @@ MIDDLEWARE_CLASSES = (
'embargo.middleware.EmbargoMiddleware',
# Detects user-requested locale from 'accept-language' header in http request
'django.middleware.locale.LocaleMiddleware',
# TODO: Re-import the Django version once we upgrade to Django 1.8 [PLAT-671]
# 'django.middleware.locale.LocaleMiddleware',
'django_locale.middleware.LocaleMiddleware',
'django.middleware.transaction.TransactionMiddleware',
# needs to run after locale middleware (or anything that modifies the request context)