{% if hosts %}
IP address
Hostname
Country
{% for host in hosts %}
{{ host.ip_address }}
{{ host.hostname|default:"Lookup failed" }}
{% if host.country_code %} {{host.country_code}} {% endif %}  {{ host.country_name }}
{% endfor %}
{% else %}    -- direct connection -- {% endif %}