Numeric for loop in Django templates -


how write numeric for loop in django template? mean like

for = 1 n 

i've used simple technique works nicely small cases no special tags , no additional context. comes in handy

{% in "xxxxxxxxxxxxxxxxxxxx" %}     {{ forloop.counter0 }} {% endfor %} 

adjust length of "xxxxxxxxxxxxxxxxxxxx" according needs. "xxx" 3 iterations, etc.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -