I have a single list my_list
in my context, and I'd like to render it as two "columns", with the first (n+1)/2 items in the first column and the last n/2 items in the second column. Is there a straight-forward way to do this with django template tags/filters or do I need to pre-split the list into two in my view?
e.g.,
<div class="split-50-left">
<ul>
{% for item in [first half of my_list] %}
<li>{{item}}</li>
{% endfor %}
</ul>
</div>
<div class="split-50-right">
<ul>
{% for item in [second half of my_list] %}
<li>{{item}}</li>
{% endfor %}
</ul>
</div>