I have a list of 16 results, let\'s call it \"results\". I want to arrange them in a 4 x 4 table.
Using the django template, how can I do this? (It doesn\'t seem like cy
Suppose you have: results=[[1, 2, 3, 4,], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]]
results=[[1, 2, 3, 4,], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]]
The following template can be used to display results in a table:
{% for rowval in results %} {% for val in rowval %} {{val}} {% endfor %} {% endfor %}
It will display:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16