From 0322f2b6533852b51d83ac4d55f11d75cc0f41b0 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Sat, 7 May 2011 16:58:45 +0000 Subject: Fixed #15263 -- Added support for format localization to the now template tag. Thanks to danielr and dmclain. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16172 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/ref/templates/builtins.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'docs') diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 1767b5ba07..29bed25db9 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -727,6 +727,18 @@ escaped, because it's not a format character:: This would display as "It is the 4th of September". +.. versionchanged:: 1.4 + +.. note:: + + The format passed can also be one of the predefined ones + :setting:`DATE_FORMAT`, :setting:`DATETIME_FORMAT`, + :setting:`SHORT_DATE_FORMAT` or :setting:`SHORT_DATETIME_FORMAT`. + The predefined formats may vary depending on the current locale and + if :ref:`format-localization` is enabled, e.g.:: + + It is {% now "SHORT_DATETIME_FORMAT" %} + .. templatetag:: regroup regroup -- cgit v1.3