mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
* 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
20 lines
586 B
Python
20 lines
586 B
Python
from django.apps import AppConfig
|
|
from django.urls import URLPattern
|
|
from django.urls.resolvers import RegexPattern
|
|
|
|
|
|
class PretixMultidomainConfig(AppConfig):
|
|
name = 'pretix.multidomain'
|
|
label = 'pretixmultidomain'
|
|
|
|
|
|
default_app_config = 'pretix.multidomain.PretixMultidomainConfig'
|
|
|
|
|
|
def event_url(route, view, name=None, require_live=True):
|
|
if callable(view):
|
|
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.')
|