{% for service in services %} {% if forloop.first %}
Services
{% endif %}
{% if forloop.last %} {% else %} {% endif %} {{ service.handler }} - Status: {{ service.get_up_display }}
{% endfor %} {% for host in active_hosts %} {% if forloop.first %}
Active hosts behind port
{% endif %}
{% if forloop.last %} {% else %} {% endif %} {{ host|safe }}
{% endfor %}