From 016039e78f3eb89fe0cca07998cda8bb06002dae Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Thu, 26 Feb 2026 14:42:40 +0000 Subject: [PATCH] Show current-year school holidays and add Bristol source link Closes #209 Closes #210 --- templates/holiday_list.html | 5 ++++- web_view.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/templates/holiday_list.html b/templates/holiday_list.html index d12a7d5..a627771 100644 --- a/templates/holiday_list.html +++ b/templates/holiday_list.html @@ -21,7 +21,10 @@ {% endfor %} -

UK school holidays (Bristol)

+

+ UK school holidays (Bristol) + source +

{% for item in school_holidays %} diff --git a/web_view.py b/web_view.py index 107f30f..2d4d155 100755 --- a/web_view.py +++ b/web_view.py @@ -30,6 +30,7 @@ import agenda.stats import agenda.thespacedevs import agenda.trip import agenda.trip_schengen +import agenda.uk_school_holiday import agenda.utils import agenda.weather from agenda import ical, calendar, format_list_with_ampersand, travel, uk_tz @@ -885,10 +886,11 @@ def holiday_list() -> str: """List of holidays.""" today = date.today() data_dir = app.config["DATA_DIR"] + year_start = date(today.year, 1, 1) next_year = today + timedelta(days=1 * 365) items = agenda.holidays.get_all(today - timedelta(days=2), next_year, data_dir) school_holidays = agenda.holidays.get_school_holidays( - today - timedelta(days=2), next_year, data_dir + year_start, next_year, data_dir ) items.sort(key=lambda item: (item.date, item.country)) @@ -898,6 +900,7 @@ def holiday_list() -> str: "holiday_list.html", items=items, school_holidays=school_holidays, + school_holiday_page_url=agenda.uk_school_holiday.school_holiday_page_url, get_country=agenda.get_country, today=today, )