Loading docs/ref/templates/api.txt +8 −0 Original line number Diff line number Diff line Loading @@ -736,6 +736,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`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Loading docs/topics/i18n/timezones.txt +3 −3 Original line number Diff line number Diff line Loading @@ -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 ---------------- Loading Loading
docs/ref/templates/api.txt +8 −0 Original line number Diff line number Diff line Loading @@ -736,6 +736,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`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Loading
docs/topics/i18n/timezones.txt +3 −3 Original line number Diff line number Diff line Loading @@ -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 ---------------- Loading