Add next instalment of the Up TV series

Closes: #7
This commit is contained in:
Edward Betts 2023-10-05 11:27:09 +01:00
parent e56cf111e8
commit c702dcf7e5
2 changed files with 10 additions and 1 deletions

View file

@ -41,6 +41,7 @@ next_uk_general_election = date(2024, 5, 2)
xmas_last_posting_dates = {"first": date(2023, 12, 20), "second": date(2023, 12, 18)}
config_filename = os.path.join(os.path.dirname(__file__), "..", "config")
assert os.path.exists(config_filename)
@ -306,6 +307,13 @@ def get_data() -> dict[str, str | object]:
for key, value in xmas_last_posting_dates.items():
events.append({"name": f"xmas_last_{key}", "date": value})
next_up_series = {
"date": date(2026, 6, 1),
"title": "70 Up",
"name": "next_up_series",
}
events.append(next_up_series)
events.sort(key=operator.itemgetter("date"))
reply["events"] = events

View file

@ -22,6 +22,7 @@
"xmas_last_second": "Christmas last posting 2nd class",
"xmas_last_first": "Christmas last posting 1st class",
"xmas_day": "Christmas day",
"next_up_series": "Next Up documentary",
}
%}
@ -100,7 +101,7 @@
{{event.date.strftime("%a, %d, %b %Y")}}
</td>
<td>
{{ event_labels[event.name] }}
{{ event_labels.get(event.name) or event.name }}
{%- if "title" in event -%}: {{ event.title }}{% endif %}
</td>
<td class="text-end">