{{ exam.name }} {{ year }} Results – {{ district.name }} District



{% for school in schools %} {% if forloop.counter|divisibleby:"3" and not forloop.last %} {% endif %} {% endfor %} {# Fill empty cells for the last row if needed #} {% with remainder=schools|length|divisibleby:"3"|yesno:"0,1,2" %} {% if remainder != "0" %} {% if remainder == "1" %} {% for _ in "12" %} {% endfor %} {% elif remainder == "2" %} {% endif %} {% endif %} {% endwith %}
{{ school.school.name|upper }}