Port django.utils.translation.trans_real.parse_accept_lang_header from Django 1.8
Add to dark_lang middleware
This commit is contained in:
@@ -12,10 +12,12 @@ the SessionMiddleware.
|
||||
"""
|
||||
from django.conf import settings
|
||||
|
||||
from django.utils.translation.trans_real import parse_accept_lang_header
|
||||
|
||||
from dark_lang.models import DarkLangConfig
|
||||
|
||||
# TODO re-import this once we're on Django 1.5 or greater. [PLAT-671]
|
||||
# from django.utils.translation.trans_real import parse_accept_lang_header
|
||||
from django_locale.trans_real import parse_accept_lang_header
|
||||
|
||||
|
||||
def dark_parse_accept_lang_header(accept):
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user