Removed reading of old 'django_language' session variable per deprecation timeline.
refs #5789.
This commit is contained in:
parent
f567d04b24
commit
6d1ae5e27c
|
@ -108,8 +108,7 @@ def logout(request):
|
||||||
user_logged_out.send(sender=user.__class__, request=request, user=user)
|
user_logged_out.send(sender=user.__class__, request=request, user=user)
|
||||||
|
|
||||||
# remember language choice saved to session
|
# remember language choice saved to session
|
||||||
# for backwards compatibility django_language is also checked (remove in 1.8)
|
language = request.session.get(LANGUAGE_SESSION_KEY)
|
||||||
language = request.session.get(LANGUAGE_SESSION_KEY, request.session.get('django_language'))
|
|
||||||
|
|
||||||
request.session.flush()
|
request.session.flush()
|
||||||
|
|
||||||
|
|
|
@ -479,8 +479,7 @@ def get_language_from_request(request, check_path=False):
|
||||||
return lang_code
|
return lang_code
|
||||||
|
|
||||||
if hasattr(request, 'session'):
|
if hasattr(request, 'session'):
|
||||||
# for backwards compatibility django_language is also checked (remove in 1.8)
|
lang_code = request.session.get(LANGUAGE_SESSION_KEY)
|
||||||
lang_code = request.session.get(LANGUAGE_SESSION_KEY, request.session.get('django_language'))
|
|
||||||
if lang_code in _supported and lang_code is not None and check_for_language(lang_code):
|
if lang_code in _supported and lang_code is not None and check_for_language(lang_code):
|
||||||
return lang_code
|
return lang_code
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue