mirror of
https://github.com/pretix/pretix.git
synced 2026-08-19 12:16:26 +00:00
Add event_begin_time & event_end_time to scheduledmail templates (Z#23241932) (#6484)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user