New implementation of sales channels (#4111)

Co-authored-by: Martin Gross <gross@rami.io>
This commit is contained in:
Raphael Michel
2024-06-30 19:24:30 +02:00
committed by GitHub
parent 95511b0330
commit 4fb5c6bef0
174 changed files with 2902 additions and 616 deletions

View File

@@ -21,9 +21,9 @@
#
from django.dispatch import receiver
from pretix.base.channels import SalesChannel
from pretix.base.channels import SalesChannelType
from pretix.base.signals import (
register_payment_providers, register_sales_channels,
register_payment_providers, register_sales_channel_types,
register_ticket_outputs,
)
@@ -43,14 +43,14 @@ def register_payment_provider(sender, **kwargs):
return [DummyPaymentProvider, DummyFullRefundablePaymentProvider, DummyPartialRefundablePaymentProvider]
class FoobazSalesChannel(SalesChannel):
class FoobazSalesChannel(SalesChannelType):
identifier = "baz"
verbose_name = "Foobar"
icon = "home"
testmode_supported = False
class FoobarSalesChannel(SalesChannel):
class FoobarSalesChannel(SalesChannelType):
identifier = "bar"
verbose_name = "Foobar"
icon = "home"
@@ -58,6 +58,6 @@ class FoobarSalesChannel(SalesChannel):
unlimited_items_per_order = True
@receiver(register_sales_channels, dispatch_uid="sc_dummy")
@receiver(register_sales_channel_types, dispatch_uid="sc_dummy")
def register_sc(sender, **kwargs):
return [FoobarSalesChannel, FoobazSalesChannel]