mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
[1.0.X]: Fixed #10375 -- Added documentation about the default format strings used for the date and time filters when no format string is passed to the filter, based on patch from kgrandis.
Backport of r10259 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10260 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -837,6 +837,13 @@ If ``value`` is a ``datetime`` object (e.g., the result of
|
|||||||
``datetime.datetime.now()``), the output will be the string
|
``datetime.datetime.now()``), the output will be the string
|
||||||
``'Wed 09 Jan 2008'``.
|
``'Wed 09 Jan 2008'``.
|
||||||
|
|
||||||
|
When used without a format string::
|
||||||
|
|
||||||
|
{{ value|date }}
|
||||||
|
|
||||||
|
...the formatting string defined in the :setting:`DATE_FORMAT` setting will be
|
||||||
|
used.
|
||||||
|
|
||||||
.. templatefilter:: default
|
.. templatefilter:: default
|
||||||
|
|
||||||
default
|
default
|
||||||
@@ -1380,6 +1387,13 @@ For example::
|
|||||||
If ``value`` is equivalent to ``datetime.datetime.now()``, the output will be
|
If ``value`` is equivalent to ``datetime.datetime.now()``, the output will be
|
||||||
the string ``"01:23"``.
|
the string ``"01:23"``.
|
||||||
|
|
||||||
|
When used without a format string::
|
||||||
|
|
||||||
|
{{ value|time }}
|
||||||
|
|
||||||
|
...the formatting string defined in the :setting:`TIME_FORMAT` setting will be
|
||||||
|
used.
|
||||||
|
|
||||||
.. templatefilter:: timesince
|
.. templatefilter:: timesince
|
||||||
|
|
||||||
timesince
|
timesince
|
||||||
|
|||||||
Reference in New Issue
Block a user