Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[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
  • Loading branch information...
commit d073efa0bb5cf7bb2fe8e76bbd2c94fb6b97c816 1 parent b3b541b
Gary Wilson Jr. authored March 31, 2009

Showing 1 changed file with 14 additions and 0 deletions. Show diff stats Hide diff stats

  1. 14  docs/ref/templates/builtins.txt
14  docs/ref/templates/builtins.txt
@@ -837,6 +837,13 @@ If ``value`` is a ``datetime`` object (e.g., the result of
837 837
 ``datetime.datetime.now()``), the output will be the string
838 838
 ``'Wed 09 Jan 2008'``.
839 839
 
  840
+When used without a format string::
  841
+
  842
+    {{ value|date }}
  843
+
  844
+...the formatting string defined in the :setting:`DATE_FORMAT` setting will be
  845
+used.
  846
+
840 847
 .. templatefilter:: default
841 848
 
842 849
 default
@@ -1380,6 +1387,13 @@ For example::
1380 1387
 If ``value`` is equivalent to ``datetime.datetime.now()``, the output will be
1381 1388
 the string ``"01:23"``.
1382 1389
 
  1390
+When used without a format string::
  1391
+
  1392
+    {{ value|time }}
  1393
+
  1394
+...the formatting string defined in the :setting:`TIME_FORMAT` setting will be
  1395
+used.
  1396
+
1383 1397
 .. templatefilter:: timesince
1384 1398
 
1385 1399
 timesince

0 notes on commit d073efa

Please sign in to comment.
Something went wrong with that request. Please try again.