I am outputting a series of Django objects in a template:
{% for obj in list %}
...
{% endfor %}
But I'd like to only output the first five of these, then put the remainder in the seperate <DIV>.
The idea being, that I can hide the second half until required.
I envisage something like this, but need to restrict the elements iterated:
{% for obj in list %}
...
{% endfor %}
<a href="" onclick="unhide()">Show hidden</a>
<div id="hidden">
{% for obj in list %}
...
{% endfor %}
</div>
Is it possible to do this within the template alone? It's presentation logic, so I'd rather not pollute the view.