mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Consistently set default background PDFs on server, not client (#2840)
Co-authored-by: Martin Gross <gross@rami.io>
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
|
||||
from django.apps import AppConfig
|
||||
from django.utils.functional import cached_property
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.utils.translation import gettext, gettext_lazy as _
|
||||
|
||||
from pretix import __version__ as version
|
||||
|
||||
@@ -63,3 +63,11 @@ class TicketOutputPdfApp(AppConfig):
|
||||
except ImportError:
|
||||
errs.append("Python package 'reportlab' is not installed.")
|
||||
return errs
|
||||
|
||||
def installed(self, event):
|
||||
event.ticket_layouts.get_or_create(
|
||||
default=True,
|
||||
defaults={
|
||||
'name': gettext('Default layout'),
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user