Mercurial > personal > weather-server
diff weather_server/server.py @ 26:7def5611895b
Add support for an index page displaying all locations.
This seems as good a time as any to declare 0.1.0.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Sun, 10 Nov 2019 23:46:51 -0500 |
parents | 88249e451566 |
children | b77c8e7d2742 |
line wrap: on
line diff
--- a/weather_server/server.py Sun Nov 10 23:43:37 2019 -0500 +++ b/weather_server/server.py Sun Nov 10 23:46:51 2019 -0500 @@ -22,7 +22,11 @@ @app.route('/') def home(): - return 'Weather server' + locations = tuple(locs.locations().values()) + return flask.render_template( + 'index.html', + locations=locations, + ) @app.route('/_submit', methods=['POST']) def submit():