diff options
| author | Tim Graham <timograham@gmail.com> | 2012-09-13 12:23:28 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2012-09-13 12:23:28 -0700 |
| commit | 87c06fa4f4b908b940bea7cde95251d4daf78f3c (patch) | |
| tree | e1e10030b770bd225f903bf4528e19387f3e2e4e | |
| parent | 690170a8b9bbcea1ae51e4020aea49987fefdbd2 (diff) | |
| parent | 3fb2662edcdfb03ebb4b2ab60ffe309104809246 (diff) | |
Merge pull request #364 from martey/ticket_18933
Fixed #18933 - Fixes code example for cycle in docstring.
| -rw-r--r-- | django/template/defaulttags.py | 6 |
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 %} """ |
