Add effective presale_start and presale_end properties (#1851)

This commit is contained in:
Martin Gross
2020-11-19 15:04:19 +01:00
committed by GitHub
parent b8db58b978
commit 6aa3532ee6
5 changed files with 32 additions and 8 deletions

View File

@@ -569,8 +569,8 @@ class WidgetAPIProductList(EventListMixin, View):
data['error'] = gettext('The presale period for this event is over.')
elif request.event.settings.presale_start_show_date:
data['error'] = gettext('The presale for this event will start on %(date)s at %(time)s.') % {
'date': date_format(ev.presale_start.astimezone(request.event.timezone), "SHORT_DATE_FORMAT"),
'time': date_format(ev.presale_start.astimezone(request.event.timezone), "TIME_FORMAT"),
'date': date_format(ev.effective_presale_start.astimezone(request.event.timezone), "SHORT_DATE_FORMAT"),
'time': date_format(ev.effective_presale_start.astimezone(request.event.timezone), "TIME_FORMAT"),
}
else:
data['error'] = gettext('The presale for this event has not yet started.')