forked from CGM_Public/pretix_original
Upgrade to Django 2.1 (#710)
* Upgrade to Django 2.0 * more models * i18n foo * Update setup.py * Fix Sentry exception PRETIXEU-JC * Enforce slug uniqueness * Import sorting * Upgrade to Django 2.1 * Travis config * Try to fix PostgreSQL failure * Smaller test matrix * staticfiles→static * Include request in all authenticate() calls
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
from django.urls import RegexURLPattern
|
||||
from django.urls import URLPattern
|
||||
from django.urls.resolvers import RegexPattern
|
||||
|
||||
|
||||
class PretixMultidomainConfig(AppConfig):
|
||||
@@ -10,10 +11,9 @@ class PretixMultidomainConfig(AppConfig):
|
||||
default_app_config = 'pretix.multidomain.PretixMultidomainConfig'
|
||||
|
||||
|
||||
def event_url(regex, view, kwargs=None, name=None, require_live=True):
|
||||
def event_url(route, view, 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.')
|
||||
pattern = RegexPattern(route, name=name, is_endpoint=True)
|
||||
pattern._require_live = require_live
|
||||
return URLPattern(pattern, view, {}, name)
|
||||
raise TypeError('view must be a callable.')
|
||||
|
||||
Reference in New Issue
Block a user