I have a fairly simple question, but I can’t seem to find a simple solution to it.
I’d like to iterate through an array in my Django template but skip the first value.
Let’s say I have an array like this that I pass to my template through a view:
array = ['1', '2', '3', '4', '5']
In my template I do :
{% for a in array %}
{{ a }}
{% endfor %}
How can I do to only print ‘2’ ‘3’ ‘4’ ‘5’, without the first value ?
See https://docs.djangoproject.com/en/1.3/ref/templates/builtins/#slice for more information.