Agenda list to include past events from the previous week

This commit is contained in:
Edward Betts 2023-11-05 12:36:05 +00:00
parent c24a83f161
commit dae74f0b7c
2 changed files with 2 additions and 1 deletions

View file

@ -493,6 +493,7 @@ def get_data(now: datetime) -> typing.Mapping[str, str | object]:
events.sort(key=operator.attrgetter("as_datetime"))
reply["events"] = events
reply["last_week"] = today - timedelta(weeks=1)
reply["fullcalendar_events"] = calendar.build_events(events)

View file

@ -113,7 +113,7 @@
<h3>Agenda</h3>
{% for event in events %}
{% for event in events if event.as_date >= last_week %}
<div class="row border border-1 {% if event.name in class_map %} {{ class_map[event.name]}}{% endif %}">
<div class="col-md-3">
{{event.as_date.strftime("%a, %d, %b")}}