mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Allow to use a custom domain per event (#1617)
* Drop support for maindomain_urls/subdomain_urls in plugins * Allow to use a custom domain per event * Fix bug when manually saving domains * Fix custom domains in debugging * Fix middleware * Fix middleware again, update docs
This commit is contained in:
@@ -20,7 +20,9 @@ from pretix.base.services.tasks import (
|
||||
TransactionAwareProfiledEventTask, TransactionAwareTask,
|
||||
)
|
||||
from pretix.celery_app import app
|
||||
from pretix.multidomain.urlreverse import get_domain
|
||||
from pretix.multidomain.urlreverse import (
|
||||
get_event_domain, get_organizer_domain,
|
||||
)
|
||||
from pretix.presale.signals import sass_postamble, sass_preamble
|
||||
|
||||
logger = logging.getLogger('pretix.presale.style')
|
||||
@@ -33,7 +35,10 @@ def compile_scss(object, file="main.scss", fonts=True):
|
||||
def static(path):
|
||||
sp = _static(path)
|
||||
if not settings.MEDIA_URL.startswith("/") and sp.startswith("/"):
|
||||
domain = get_domain(object.organizer if isinstance(object, Event) else object)
|
||||
if isinstance(object, Event):
|
||||
domain = get_event_domain(object, fallback=True)
|
||||
else:
|
||||
domain = get_organizer_domain(object)
|
||||
if domain:
|
||||
siteurlsplit = urlsplit(settings.SITE_URL)
|
||||
if siteurlsplit.port and siteurlsplit.port not in (80, 443):
|
||||
|
||||
Reference in New Issue
Block a user