Allow to customize description of calendar files (#2415)

Co-authored-by: Martin Gross <gross@rami.io>
This commit is contained in:
Raphael Michel
2022-01-27 14:58:16 +01:00
committed by GitHub
parent c9530c56af
commit 2daf35c39e
10 changed files with 162 additions and 29 deletions

View File

@@ -67,7 +67,7 @@ from pretix.helpers.formats.en.formats import (
SHORT_MONTH_DAY_FORMAT, WEEK_FORMAT,
)
from pretix.multidomain.urlreverse import eventreverse
from pretix.presale.ical import get_ical
from pretix.presale.ical import get_public_ical
from pretix.presale.views import OrganizerViewMixin
@@ -1159,9 +1159,9 @@ class OrganizerIcalDownload(OrganizerViewMixin, View):
if 'locale' in request.GET and request.GET.get('locale') in dict(settings.LANGUAGES):
with language(request.GET.get('locale'), self.request.organizer.settings.region):
cal = get_ical(events)
cal = get_public_ical(events)
else:
cal = get_ical(events)
cal = get_public_ical(events)
resp = HttpResponse(cal.serialize(), content_type='text/calendar')
resp['Content-Disposition'] = 'attachment; filename="{}.ics"'.format(