Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #364 from martey/ticket_18933

Fixed #18933 - Fixes code example for cycle in docstring.
  • Loading branch information...
commit 87c06fa4f4b908b940bea7cde95251d4daf78f3c 2 parents 690170a + 3fb2662
Tim Graham authored September 13, 2012

Showing 1 changed file with 2 additions and 4 deletions. Show diff stats Hide diff stats

  1. 6  django/template/defaulttags.py
6  django/template/defaulttags.py
@@ -531,11 +531,9 @@ def cycle(parser, token):
531 531
     The optional flag "silent" can be used to prevent the cycle declaration
532 532
     from returning any value::
533 533
 
534  
-        {% cycle 'row1' 'row2' as rowcolors silent %}{# no value here #}
535 534
         {% for o in some_list %}
536  
-            <tr class="{% cycle rowcolors %}">{# first value will be "row1" #}
537  
-                ...
538  
-            </tr>
  535
+            {% cycle 'row1' 'row2' as rowcolors silent %}
  536
+            <tr class="{{ rowcolors }}">{% include "subtemplate.html " %}</tr>
539 537
         {% endfor %}
540 538
 
541 539
     """

0 notes on commit 87c06fa

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