{# Display information about a city. #} {# The app fetches the information from the database and passes it into this page in "ci". #} {% extends "base.html" %} {% block title %}City Information{% endblock %} {% block content %} {# Loop over cities if we have multiple results for popular names like Milan, Rome, Berlin #} {% for city in ci %}

{{city["NAME"]}}

The city of {{city["NAME"]}} ({{city["ASCIINAME"]}}) is located in {{city["COUNTRYCODE"]}} within the timezone {{city["TIMEZONE"]}}. It has a population of {{city["POPULATION"]}}.

{# If there are alternate names, split them to format them nicely #} {% if city["ALTERNATENAMES"] %} The following alternative names are in use:

{% set namelist = (city["ALTERNATENAMES"]).split(',') %} {% for name in namelist %} {{ name }} // {% endfor %}

{% endif %}

Location Information

Latitude: {{city["LATITUDE"]}}

Longitude: {{city["LONGITUDE"]}}

Elevation: {{city["DEM"]}}

Map: {{city["NAME"]}}

{% endfor %} {% endblock %}