From 0d721e1f03c81085a8eb59be2b23d594ff15191f Mon Sep 17 00:00:00 2001 From: Mandel Olaiya Date: Sat, 9 May 2026 13:29:32 +0200 Subject: [PATCH] Allow staging/production hostnames --- mandelstudio/settings/base.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/mandelstudio/settings/base.py b/mandelstudio/settings/base.py index 29503b3..32893fa 100644 --- a/mandelstudio/settings/base.py +++ b/mandelstudio/settings/base.py @@ -36,6 +36,18 @@ INSTALLED_APPS = [ "mandelstudio", ] + INSTALLED_APPS +# Ensure the canonical staging / production hostnames are accepted by Django. +# (Staging uses the welkomstaging domain; production uses mandelblog.com.) +_extra_allowed_hosts = [ + "mandelstudio.welkombij.mandelblog.com", + "www.mandelblog.com", + "mandelblog.com", +] +if "ALLOWED_HOSTS" in globals(): + for _host in _extra_allowed_hosts: + if _host not in ALLOWED_HOSTS: + ALLOWED_HOSTS.append(_host) + # Never allow demo-data plugins in this production project context. def _is_demo_data_app(app_label: str) -> bool: