summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBouke Haarsma <bouke@webatoom.nl>2013-10-18 13:56:32 +0200
committerTim Graham <timograham@gmail.com>2013-10-22 09:24:42 -0400
commit0d0f4f020afe516f23fd2305f13ff0a6a539b344 (patch)
tree3f9450b5779735fe263b0dc442f6d4cec05418cc /docs
parent8e2029f8ddd744acb97e236cb0703d94b12d5ff8 (diff)
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.
Diffstat (limited to 'docs')
-rw-r--r--docs/internals/deprecation.txt3
-rw-r--r--docs/releases/1.7.txt7
-rw-r--r--docs/topics/i18n/translation.txt9
3 files changed, 17 insertions, 2 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
index bf26d8d855..42b81419ec 100644
--- a/docs/internals/deprecation.txt
+++ b/docs/internals/deprecation.txt
@@ -410,6 +410,9 @@ these changes.
* The ``Model._meta.get_(add|change|delete)_permission`` methods will
be removed.
+* The session key ``django_language`` will no longer be read for backwards
+ compatibility.
+
1.9
---
diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt
index d5c1f886da..699566f1d3 100644
--- a/docs/releases/1.7.txt
+++ b/docs/releases/1.7.txt
@@ -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
^^^^^^^^^^^^^^^^^^^
diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt
index d8c2b49724..08e87b1425 100644
--- a/docs/topics/i18n/translation.txt
+++ b/docs/topics/i18n/translation.txt
@@ -1594,8 +1594,13 @@ following this algorithm:
root URLconf. See :ref:`url-internationalization` for more information
about the language prefix and how to internationalize URL patterns.
-* Failing that, it looks for a ``django_language`` key in the current
- user's session.
+* Failing that, it looks for a ``_language`` key in the current user's session.
+
+ .. versionchanged:: 1.7
+
+ In previous versions, the key was named ``django_language`` but it was
+ renamed to start with an underscore to denote a Django reserved session
+ key.
* Failing that, it looks for a cookie.