1
0
mirror of https://github.com/django/django.git synced 2025-06-05 03:29:12 +00:00

[1.4.x] Fixed #18472 - Added warning regarding set_language / i18n_patterns.

Backport of d7816c563b58ed53d49956321d549a16e2b2ebc0 from master.
This commit is contained in:
Simon Meers 2012-08-02 21:13:22 +10:00
parent a276bdebb2
commit 68fd7f56e1

View File

@ -1249,6 +1249,12 @@ Activate this view by adding the following line to your URLconf::
(Note that this example makes the view available at ``/i18n/setlang/``.) (Note that this example makes the view available at ``/i18n/setlang/``.)
.. warning::
Make sure that you don't include the above URL within
:func:`~django.conf.urls.i18n.i18n_patterns` - it needs to be
language-independent itself to work correctly.
The view expects to be called via the ``POST`` method, with a ``language`` The view expects to be called via the ``POST`` method, with a ``language``
parameter set in request. If session support is enabled, the view parameter set in request. If session support is enabled, the view
saves the language choice in the user's session. Otherwise, it saves the saves the language choice in the user's session. Otherwise, it saves the