summaryrefslogtreecommitdiff
path: root/waterspout_radar/web.py
blob: 37905c3caa7133bc02293538d0474cb771fd978c (plain)
1
2
3
4
5
6
7
8
9
10
11
import flask

from . import _storage

app = flask.Flask(__name__)


@app.route("/")
def predictions():
	predictions = sorted(_storage.Storage(".waterspout/predictions.json"), key=lambda x: (x.time, x.swi))
	return flask.render_template("predictions.html", predictions=predictions)