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:
@@ -1,4 +1,5 @@
|
||||
from django.apps import AppConfig
|
||||
from django.urls import RegexURLPattern
|
||||
|
||||
|
||||
class PretixMultidomainConfig(AppConfig):
|
||||
@@ -7,3 +8,12 @@ class PretixMultidomainConfig(AppConfig):
|
||||
|
||||
|
||||
default_app_config = 'pretix.multidomain.PretixMultidomainConfig'
|
||||
|
||||
|
||||
def event_url(regex, view, kwargs=None, name=None, require_live=True):
|
||||
if callable(view):
|
||||
r = RegexURLPattern(regex, view, kwargs, name)
|
||||
r._require_live = require_live
|
||||
return r
|
||||
else:
|
||||
raise TypeError('view must be a callable.')
|
||||
|
||||
Reference in New Issue
Block a user