There is a prelude in java where I can tell where to start and where to the end:
for(int i=10;i<array.length;i++){ }
but how can I implement this int i=10
in a django template? How can I set the start and end point on my own?
forloop.first
and forloop.last
, but they are defined inside the loop, and I can not do something like this ?:
{{forloop.first=10}} {% for athlete in athlete_list %} <li>{{ athlete.name }}</li> {% endfor %} {{forloop.last=20}}
I read django doc, but this function does not seem to exist
source share