Drive search form dropdowns from VALID_MIN/MAX_CONNECTIONS; warn on short transfers
Index page connection time dropdowns now iterate over valid_min_connections
and valid_max_connections passed from the view, so any change to the sets
in app.py is reflected automatically (also adds the missing 45 min option).
Add ⚠️ next to transfer times under 80 minutes in the results table;
store connection_minutes in each trip dict to support the comparison.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
19656f412a
commit
e7695a5e49
4 changed files with 11 additions and 4 deletions
8
app.py
8
app.py
|
|
@ -36,7 +36,13 @@ DESTINATIONS = {
|
|||
@app.route('/')
|
||||
def index():
|
||||
today = date.today().isoformat()
|
||||
return render_template('index.html', destinations=DESTINATIONS, today=today)
|
||||
return render_template(
|
||||
'index.html',
|
||||
destinations=DESTINATIONS,
|
||||
today=today,
|
||||
valid_min_connections=sorted(VALID_MIN_CONNECTIONS),
|
||||
valid_max_connections=sorted(VALID_MAX_CONNECTIONS),
|
||||
)
|
||||
|
||||
|
||||
VALID_MIN_CONNECTIONS = {45, 50, 60, 70, 80, 90, 100, 110, 120}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue