Mercurial > hg > GlobalNeighbors
view globalneighbors/templates/city.html @ 25:991bce6b6881 default tip
[knn] placeholder for planning session
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 17 Sep 2017 14:35:50 -0700 |
parents | 6891c5523b69 |
children |
line wrap: on
line source
<!DOCTYPE html> <html> <head> <title>{{ city.name }}</title> </head> <body> <a href="/" title="back to Global Niehgbors">Home</a> <h1>{{ city.name }}</h1> <!-- give a link to Google maps, for fun --> <h2> <a href="https://www.google.com/maps/?ll={{city.latitude}},{{city.longitude}}" target="_blank" title="location">{{city.latitude}},{{city.longitude}} </a> </h2> <dl> <dt>Population:</dt> <dd>{{ city.population }}</dd> <dt>Country:</dt> <dd>{{ city['country code'] }} </dl> {% if neighbors %} <div> <p> {{ neighbors|length }} nearest neighbors: </p> <table> <tr><th>Neighbor</th><th>Distance (km)</th></tr> {% for neighbor in neighbors %} <tr> <td><a href="/{{ neighbor.geoid }}">{{ neighbor.name }}</a></td> <td>{{ neighbor.distance }}</td> </tr> {% endfor %} </table> </div> {% endif %} </body> </html>