djangosnippets.org: Latest snippets tagged with 'continue'https://djangosnippets.org/tags/continue/2010-07-04T14:28:44.717080-05:00Continuing and breaking from loops in Django templates
2010-07-04T14:28:44.717080-05:00gsakkishttps://djangosnippets.org/snippets/2093/<p>This snippet makes Django templates support <code>break</code> and <code>continue</code> in loops. It is actually more powerful than the respective Python statements as it allows breaking and continuing from an outer loop, not just the innermost.</p>
<p><code>break</code> and <code>continue</code> are implemented as template filters, with the input value being the loop …</p>
Freely redistributable