Added a payment provider for free products

This commit is contained in:
Raphael Michel
2015-06-23 10:02:47 +02:00
parent 7308405da5
commit bef9e05e0b
7 changed files with 108 additions and 11 deletions

View File

@@ -29,6 +29,7 @@ class EventPluginSignal(django.dispatch.Signal):
# Find the Django application this belongs to
searchpath = receiver.__module__
app = None
mod = None
while "." in searchpath:
try:
if apps.is_installed(searchpath):
@@ -37,8 +38,8 @@ class EventPluginSignal(django.dispatch.Signal):
pass
searchpath, mod = searchpath.rsplit(".", 1)
# Only fire receivers from active plugins
if app.name in sender.get_plugins():
# Only fire receivers from active plugins and core modules
if (searchpath, mod) == ("pretix", "base") or (app and app.name in sender.get_plugins()):
if not hasattr(app, 'compatibility_errors') or not app.compatibility_errors:
response = receiver(signal=self, sender=sender, **named)
responses.append((receiver, response))