WIP: first successful pass creation

This commit is contained in:
Kara Engelhardt
2026-06-01 15:25:59 +02:00
parent 682e27126e
commit ad9cdc9f89
5 changed files with 100 additions and 61 deletions

View File

@@ -12,12 +12,14 @@ from django.conf import settings
from .models import WalletLayout
from .styles import AVAILABLE_STYLES, AVAILABLE_PLATFORMS
from django.contrib.staticfiles import finders
def get_layout_variables(event):
return {
"text": get_variables(event),
"image": get_images(event)
| {"poweredby": {"label": _("pretix-Logo")}}, # TODO: image upload
| {"poweredby": {"label": _("pretix-Logo"), "evaluate": lambda *_: open(finders.find("pretix_passbook/logo.png"), "rb")},
"poweredby_icon": {"label": _("pretix-Icon"), "evaluate": lambda *_: open(finders.find("pretix_passbook/icon.png"), "rb")}}, # TODO: image upload
}