I am trying to use django 1.10 templating system to display a list as a sequence of row, each containing at most 3 columns. In Jinja2 I would write:
{% for items in all_items|batch(3) %}
<div class="row">
{% for item in items %}
<div class="col-md-4">
<h1> {{item.name}} </h1>
</div>
{% endfor %}
</div>
{% endfor %}
Using the batch filter in Jinja2 produces the desired output. I could not find an equivalent filter in django templates. What is the django way to achieve this ?