LogEntryType registry (#4235)

Move display of LogEntry details from the `logentry_display` and 
`logentry_object_link` signals to a class hierarchy based approach. 
For each action_type, an instance of a subclass of `LogEntryType` 
is registered in the `log_entry_types` registry.

Analogous to EventPluginSignal, this registry is an `EventPluginRegistry`, 
so it keeps track of the plugin the LogEntryType is defined in.

---------

Co-authored-by: Raphael Michel <michel@rami.io>
Co-authored-by: Richard Schreiber <schreiber@rami.io>
This commit is contained in:
Mira
2025-01-16 13:05:57 +01:00
committed by GitHub
parent c25d6988a7
commit c8d4815c9e
16 changed files with 1298 additions and 665 deletions

View File

@@ -22,17 +22,10 @@
from django.dispatch import receiver
from pretix.base.signals import logentry_display, register_payment_providers
from pretix.base.signals import register_payment_providers
@receiver(register_payment_providers, dispatch_uid="payment_paypal")
def register_payment_provider(sender, **kwargs):
from .payment import Paypal
return Paypal
@receiver(signal=logentry_display, dispatch_uid="paypal_logentry_display")
def pretixcontrol_logentry_display(sender, logentry, **kwargs):
from pretix.plugins.paypal2.signals import pretixcontrol_logentry_display
return pretixcontrol_logentry_display(sender, logentry, **kwargs)