summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartey Dodoo <martey@marteydodoo.com>2012-09-09 00:35:40 -0400
committerMartey Dodoo <martey@marteydodoo.com>2012-09-09 00:35:40 -0400
commit3fb2662edcdfb03ebb4b2ab60ffe309104809246 (patch)
treee4ec0ec9953ad0009a2e81eec1cbb09ff1ace855
parent5e99a3d41b5d7b7d8d135283fd25262fdcb1b7fd (diff)
Fixes #18933. Fixes code example in docstring.
Makes code example of silent keyword docstring in cycle templatetag method the same as in the documentation.
-rw-r--r--django/template/defaulttags.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py
index cb2ecd26d8..ea1dd0281e 100644
--- a/django/template/defaulttags.py
+++ b/django/template/defaulttags.py
@@ -531,11 +531,9 @@ def cycle(parser, token):
The optional flag "silent" can be used to prevent the cycle declaration
from returning any value::
- {% cycle 'row1' 'row2' as rowcolors silent %}{# no value here #}
{% for o in some_list %}
- <tr class="{% cycle rowcolors %}">{# first value will be "row1" #}
- ...
- </tr>
+ {% cycle 'row1' 'row2' as rowcolors silent %}
+ <tr class="{{ rowcolors }}">{% include "subtemplate.html " %}</tr>
{% endfor %}
"""