Remove old unused code.
This commit is contained in:
parent
1ce82858ae
commit
9f1f64708f
2 changed files with 0 additions and 173 deletions
35
web_view.py
35
web_view.py
|
|
@ -379,41 +379,6 @@ def get_trip_list(
|
|||
]
|
||||
|
||||
|
||||
@app.route("/trip/old")
|
||||
def trip_old_list() -> str:
|
||||
"""Page showing a list of trips."""
|
||||
route_distances = agenda.travel.load_route_distances(app.config["DATA_DIR"])
|
||||
trip_list = get_trip_list(route_distances)
|
||||
today = date.today()
|
||||
|
||||
current = [
|
||||
item
|
||||
for item in trip_list
|
||||
if item.start <= today and (item.end or item.start) >= today
|
||||
]
|
||||
|
||||
past = [item for item in trip_list if (item.end or item.start) < today]
|
||||
future = [item for item in trip_list if item.start > today]
|
||||
|
||||
future_coordinates, future_routes = agenda.trip.get_coordinates_and_routes(future)
|
||||
past_coordinates, past_routes = agenda.trip.get_coordinates_and_routes(past)
|
||||
|
||||
return flask.render_template(
|
||||
"trip_list.html",
|
||||
current=current,
|
||||
past=past,
|
||||
future=future,
|
||||
future_coordinates=future_coordinates,
|
||||
future_routes=future_routes,
|
||||
past_coordinates=past_coordinates,
|
||||
past_routes=past_routes,
|
||||
today=today,
|
||||
get_country=agenda.get_country,
|
||||
format_list_with_ampersand=format_list_with_ampersand,
|
||||
fx_rate=agenda.fx.get_rates(app.config),
|
||||
)
|
||||
|
||||
|
||||
@app.route("/trip")
|
||||
def trip_list() -> werkzeug.Response:
|
||||
"""Trip list to redirect to future trip list."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue