Add event_begin_time & event_end_time to scheduledmail templates (Z#23241932) (#6484)

This commit is contained in:
Richard Schreiber
2026-08-18 16:19:15 +02:00
committed by GitHub
parent f9ea9de078
commit 1c17c35b16
+16
View File
@@ -561,6 +561,22 @@ def base_placeholders(sender, **kwargs):
'event_location', ['event_or_subevent'], lambda event_or_subevent: str(event_or_subevent.location or ''),
lambda event: str(event.location or ''),
),
SimpleFunctionalTextPlaceholder(
'event_begin_time', ['event_or_subevent'],
lambda event_or_subevent:
date_format(event_or_subevent.date_from.astimezone(event_or_subevent.timezone), 'TIME_FORMAT')
if event_or_subevent.date_from
else '',
lambda event: date_format(event.date_from.astimezone(event.timezone), 'TIME_FORMAT') if event.date_from else '',
),
SimpleFunctionalTextPlaceholder(
'event_end_time', ['event_or_subevent'],
lambda event_or_subevent:
date_format(event_or_subevent.date_to.astimezone(event_or_subevent.timezone), 'TIME_FORMAT')
if event_or_subevent.date_to
else '',
lambda event: date_format(event.date_to.astimezone(event.timezone), 'TIME_FORMAT') if event.date_to else '',
),
SimpleFunctionalTextPlaceholder(
'event_admission_time', ['event_or_subevent'],
lambda event_or_subevent: