diff --git a/src/pretix/plugins/wallet/models.py b/src/pretix/plugins/wallet/models.py index b19efaaf23..b9cdd07842 100644 --- a/src/pretix/plugins/wallet/models.py +++ b/src/pretix/plugins/wallet/models.py @@ -37,7 +37,7 @@ class WalletLayout(LoggedModel): ) platform = models.CharField(max_length=10) style = models.CharField(max_length=255) - layout = models.TextField() + layout = models.JSONField() class Meta: ordering = ("name",) diff --git a/src/pretix/plugins/wallet/styles.py b/src/pretix/plugins/wallet/styles.py index 42a1146d9b..6813264662 100644 --- a/src/pretix/plugins/wallet/styles.py +++ b/src/pretix/plugins/wallet/styles.py @@ -10,15 +10,12 @@ class WalletPlatform: identifier: str name: str - def get_layout_qs(self): - return WalletLayout.objects.filter(platform=self.identifier) - class ApplePlatform(WalletPlatform): identifier = "apple" name = _("Apple") class GooglePlatform(WalletPlatform): - identifier = "apple" + identifier = "google" name = _("Google") class PlaceholderFieldType(enum.Enum): diff --git a/src/pretix/plugins/wallet/templates/pretixplugins/wallet/layout_list.html b/src/pretix/plugins/wallet/templates/pretixplugins/wallet/layout_list.html index 07e52663af..cfe685a565 100644 --- a/src/pretix/plugins/wallet/templates/pretixplugins/wallet/layout_list.html +++ b/src/pretix/plugins/wallet/templates/pretixplugins/wallet/layout_list.html @@ -1,6 +1,7 @@ {% extends "pretixcontrol/event/base.html" %} {% load i18n %} {% load money %} +{% load wallet %} {% block title %}{% trans "Wallet layouts" %}{% endblock %} {% block content %}