mirror of
https://github.com/django/django.git
synced 2025-07-24 21:54:14 +00:00
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
This commit is contained in:
parent
032b4ab5df
commit
0322f2b653
4 changed files with 19 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue