summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2016-06-14 12:57:17 +0300
committerBaptiste Mispelon <bmispelon@gmail.com>2016-06-14 11:58:50 +0200
commit61bcf0413244375a74d9c2aae9190d9b057f9635 (patch)
treea86e75190e8482ed37686019279198aed3a1ee7a /docs
parent8f91c42b58270d875b18933d9733dc91fe90ba5c (diff)
[1.10.x] Fixed #26754 -- Documented django.template.context_processors.tz
Backport of 7003174fec188bd5a21e3d62bd5e13e80f6f329c from master
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/templates/api.txt8
-rw-r--r--docs/topics/i18n/timezones.txt6
2 files changed, 11 insertions, 3 deletions
diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt
index 1bfb1f87a5..b4162a7dfc 100644
--- a/docs/ref/templates/api.txt
+++ b/docs/ref/templates/api.txt
@@ -746,6 +746,14 @@ tag for protection against :doc:`Cross Site Request Forgeries
If this processor is enabled, every ``RequestContext`` will contain a variable
``request``, which is the current :class:`~django.http.HttpRequest`.
+``django.template.context_processors.tz``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. function:: tz
+
+If this processor is enabled, every ``RequestContext`` will contain a variable
+``TIME_ZONE``, providing the name of the currently active time zone.
+
``django.contrib.messages.context_processors.messages``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/docs/topics/i18n/timezones.txt b/docs/topics/i18n/timezones.txt
index 7beffdea72..e9abc22f59 100644
--- a/docs/topics/i18n/timezones.txt
+++ b/docs/topics/i18n/timezones.txt
@@ -315,9 +315,9 @@ You can get the name of the current time zone using the
{% get_current_timezone as TIME_ZONE %}
-If you enable the ``django.template.context_processors.tz`` context processor,
-each :class:`~django.template.RequestContext` will contain a ``TIME_ZONE``
-variable with the value of ``get_current_timezone()``.
+Alternatively, you can activate the
+:func:`~django.template.context_processors.tz` context processor and
+use the ``TIME_ZONE`` context variable.
Template filters
----------------