Mercurial > hg > GlobalNeighbors
comparison globalneighbors/templates/city.html @ 23:6891c5523b69
load with neighbors :)
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 25 Jun 2017 18:13:43 -0700 |
parents | 21095c9006e5 |
children |
comparison
equal
deleted
inserted
replaced
22:e69cb496324e | 23:6891c5523b69 |
---|---|
22 <dd>{{ city.population }}</dd> | 22 <dd>{{ city.population }}</dd> |
23 | 23 |
24 <dt>Country:</dt> | 24 <dt>Country:</dt> |
25 <dd>{{ city['country code'] }} | 25 <dd>{{ city['country code'] }} |
26 </dl> | 26 </dl> |
27 | |
28 {% if neighbors %} | |
29 <div> | |
30 <p> | |
31 {{ neighbors|length }} nearest neighbors: | |
32 </p> | |
33 <table> | |
34 <tr><th>Neighbor</th><th>Distance (km)</th></tr> | |
35 {% for neighbor in neighbors %} | |
36 <tr> | |
37 <td><a href="/{{ neighbor.geoid }}">{{ neighbor.name }}</a></td> | |
38 <td>{{ neighbor.distance }}</td> | |
39 </tr> | |
40 {% endfor %} | |
41 </table> | |
42 </div> | |
43 {% endif %} | |
27 </body> | 44 </body> |
28 </html> | 45 </html> |