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:
Raphael Michel
2020-03-23 13:03:14 +01:00
committed by GitHub
parent ac2fc2de5c
commit 7e9c9beace
19 changed files with 386 additions and 89 deletions

View File

@@ -95,9 +95,10 @@ class OrganizerUpdateForm(OrganizerForm):
raise ValidationError(
_('You cannot choose the base domain of this installation.')
)
if KnownDomain.objects.filter(domainname=d).exclude(organizer=self.instance.pk).exists():
if KnownDomain.objects.filter(domainname=d).exclude(organizer=self.instance.pk,
event__isnull=True).exists():
raise ValidationError(
_('This domain is already in use for a different organizer.')
_('This domain is already in use for a different event or organizer.')
)
return d