2010-06-30 97 views

回答

0

你可以做到这一点与在Django的if tag 1.2

{% for blip in blah %} 
    {% if forloop.counter > 5 %} 
    {# Do somthing #} 
    {% endif %} 
{% endfor %} 

如果你还在使用Django的早期版本,那么你可以检查出智能如果djangosnippets标签:http://djangosnippets.org/snippets/1350/

+0

我使用Django .96与谷歌应用程序引擎,它不工作 – demos 2010-06-30 16:01:35

+0

对不起。我现在看到的片段是用于Django 1.0或更高版本的。 – 2010-06-30 16:32:04