From 5805c49fe31154469c9e7f0d145c7405ef252ea2 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Wed, 27 Dec 2023 08:22:53 +0000 Subject: [PATCH] Add gaps page --- web_view.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/web_view.py b/web_view.py index d412c93..4437ed0 100755 --- a/web_view.py +++ b/web_view.py @@ -61,6 +61,14 @@ async def index() -> str: return flask.render_template("index.html", today=now.date(), **data) +@app.route("/gaps") +async def gaps_page() -> str: + """List of available gaps.""" + now = datetime.now() + data = await agenda.data.get_data(now, app.config) + return flask.render_template("gaps.html", today=now.date(), gaps=data["gaps"]) + + @app.route("/travel") def travel_list() -> str: """Page showing a list of upcoming travel."""