Agenda list to include past events from the previous week
This commit is contained in:
parent
c24a83f161
commit
dae74f0b7c
|
@ -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)
|
||||
|
||||
|
|
|
@ -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")}}
|
||||
|
|
Loading…
Reference in a new issue