Je veux faire un do pour boucle comme (pour int x = 0; x < 3; x ++) dans un modèle django. Comment dois-je le faire? Pseudo code se présente comme suit:Faire une boucle for à l'intérieur d'un modèle
{% for Summary in Summary_list %}
{% ifchanged Summary.bu_id %}
</tr>
<tr>
<td>{{Summary.bu.version}}</td>
{% if Summary.platform_id != 1 %}
{% for x less than Summary.platform_id %}
<td><center>-</center></td>
{% x++ %}
{# Comment dois-je faire partie? #}
<td> <center>{{Summary.successCount}}</center></td>
{% else %}
<td><center> {{Summary.successCount}}</center></td>
{% endifchanged %}
{% endfor %}
Merci beaucoup!
répétition possible de: http://stackoverflow.com/questions/1107737/numeric- for-loop-in-django-templates – sberry