{% for row in table %} {% if row is iterable %} {% else %} {% if row is not empty %} {% endif %} {% endif %} {% endfor %}