1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #5789 -- Changed LocaleMiddleware session variable to '_language'.

The old 'django_language' variable will still be read from in order
to migrate users. The backwards-compatability shim will be removed in
Django 1.8.

Thanks to jdunck for the report and stugots for the initial patch.
This commit is contained in:
Bouke Haarsma
2013-10-18 13:56:32 +02:00
committed by Tim Graham
parent 8e2029f8dd
commit 0d0f4f020a
8 changed files with 58 additions and 14 deletions

View File

@@ -302,6 +302,13 @@ Internationalization
* The :attr:`django.middleware.locale.LocaleMiddleware.response_redirect_class`
attribute allows you to customize the redirects issued by the middleware.
* The :class:`~django.middleware.locale.LocaleMiddleware` now stores the user's
selected language with the session key ``_language``. Previously it was
stored with the key ``django_language``, but keys reserved for Django should
start with an underscore. For backwards compatibility ``django_language`` is
still read from in 1.7. Sessions will be migrated to the new ``_language``
key as they are written.
Management Commands
^^^^^^^^^^^^^^^^^^^