{% if contacts.count or type == "to" %}
{% for contact in contacts.all %} {% endfor %}
{% else %} {% endif %}