HI i am using a forloop in django template
{% for image in images %}
{% endfor %}
which executes for 10 steps
but i want to skip the 5th step and execute for remaining how can i do this please suggest ...
HI i am using a forloop in django template
{% for image in images %}
{% endfor %}
which executes for 10 steps
but i want to skip the 5th step and execute for remaining how can i do this please suggest ...
{% for image in images %}
{% if forloop.counter != 5 %}
...
{% endif %}
{% endfor %}
https://docs.djangoproject.com/en/dev/ref/templates/builtins/#for
{% for image in images %}
{% if forloop.counter0 != 5 %}
...
{% endif %}
{% endfor %}
this works for me