I am passing list called 'list' to view and i want to create links with href attribute as value of list element iterated by forloop.counter0
.
As far as I know getting list element requires such code :
{{ list.0 }}
But how can I iterate with forloop.counter0
values?
What I do is something like this :
{% for name in names %}
<tr>
<a href="/foo/bar/{{ list.forloop.counter0 }}">
{{ name }}
</a>
</tr>
{% endfor %}
But that doesnt apply any value and I tried with some more bracketting, but no succes.
How can I do it?