Added dispatch_uid argument to all receivers to prevent duplicate

execution
This commit is contained in:
Raphael Michel
2015-08-15 14:36:29 +02:00
parent 9720cd8fea
commit 8e086f1f3f
13 changed files with 18 additions and 18 deletions

View File

@@ -25,7 +25,7 @@ that we'll soon create::
from pretix.base.signals import register_data_exporter
@receiver(register_data_exporter)
@receiver(register_data_exporter, dispatch_uid="exporter_myexporter")
def register_data_exporter(sender, **kwargs):
from .exporter import MyExporter
return MyExporter

View File

@@ -21,7 +21,7 @@ that we'll soon create::
from pretix.base.signals import register_payment_providers
@receiver(register_payment_providers)
@receiver(register_payment_providers, dispatch_uid="payment_paypal")
def register_payment_provider(sender, **kwargs):
from .payment import Paypal
return Paypal

View File

@@ -108,7 +108,7 @@ In our example, the implementation could look like this::
from .models import TimeRestriction
@receiver(determine_availability)
@receiver(determine_availability, dispatch_uid="restriction_time")
def availability_handler(sender, **kwargs):
# Handle the signal's input arguments
item = kwargs['item']
@@ -273,7 +273,7 @@ Our time restriction example looks like this::
]
@receiver(restriction_formset)
@receiver(restriction_formset, dispatch_uid="restriction_formset_time")
def formset_handler(sender, **kwargs):
formset = inlineformset_factory(
Item,

View File

@@ -24,7 +24,7 @@ that we'll soon create::
from pretix.base.signals import register_ticket_outputs
@receiver(register_ticket_outputs)
@receiver(register_ticket_outputs, dispatch_uid="output_pdf")
def register_ticket_output(sender, **kwargs):
from .ticketoutput import PdfTicketOutput
return PdfTicketOutput