parent
2744f67987
commit
a9c9c719a4
|
@ -237,10 +237,15 @@ def trip_list() -> str:
|
|||
|
||||
@app.route("/trip/<start>")
|
||||
def trip_page(start: str) -> str:
|
||||
"""Individual trip page."""
|
||||
trip_list = build_trip_list()
|
||||
today = date.today()
|
||||
|
||||
trip = next((trip for trip in trip_list if trip.start.isoformat() == start), None)
|
||||
|
||||
if not trip:
|
||||
flask.abort(404)
|
||||
|
||||
return flask.render_template(
|
||||
"trip_page.html",
|
||||
trip=trip,
|
||||
|
|
Loading…
Reference in a new issue