diff options
Diffstat (limited to 'docs/templates.txt')
| -rw-r--r-- | docs/templates.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/templates.txt b/docs/templates.txt index c9e76d6c94..b263a64aec 100644 --- a/docs/templates.txt +++ b/docs/templates.txt @@ -540,6 +540,11 @@ The arguments can be hard-coded strings, so the following is valid:: ... {% endifequal %} +It is only possible to compare an argument to template variables or strings. +You cannot check for equality with Python objects such as ``True`` or +``False``. If you need to test if something is true or false, use the ``if`` +and ``ifnot`` tags instead. + ifnotequal ~~~~~~~~~~ @@ -1051,7 +1056,7 @@ Formats a date as the time since that date (i.e. "4 days, 6 hours"). Takes an optional argument that is a variable containing the date to use as the comparison point (without the argument, the comparison point is *now*). For example, if ``blog_date`` is a date instance representing midnight on 1 -June 2006, and ``comment_date`` is a date instanace for 08:00 on 1 June 2006, +June 2006, and ``comment_date`` is a date instance for 08:00 on 1 June 2006, then ``{{ comment_date|timesince:blog_date }}`` would return "8 hours". timeuntil |
