mirror of
https://github.com/django/django.git
synced 2025-10-30 00:56:09 +00:00
Fixes #18933. Fixes code example in docstring.
Makes code example of silent keyword docstring in cycle templatetag method the same as in the documentation.
This commit is contained in:
@@ -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 %}
|
||||
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user