mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
New handling of plugin URLs (#609)
This commit is contained in:
11
src/pretix/multidomain/plugin_handler.py
Normal file
11
src/pretix/multidomain/plugin_handler.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from pretix.presale.utils import _event_view
|
||||
|
||||
|
||||
def plugin_event_urls(urllist, plugin):
|
||||
for entry in urllist:
|
||||
if hasattr(entry, 'url_patterns'):
|
||||
plugin_event_urls(entry.url_patterns, plugin)
|
||||
elif hasattr(entry, 'callback'):
|
||||
entry.callback = _event_view(entry.callback, require_plugin=plugin,
|
||||
require_live=getattr(entry, '_require_live', True))
|
||||
return urllist
|
||||
Reference in New Issue
Block a user