From 4648b7b0b33ecb53a28f94948e2175aa6131cc0a Mon Sep 17 00:00:00 2001 From: Mandel Olaiya Date: Thu, 9 Apr 2026 01:01:46 +0200 Subject: [PATCH] Filter demo-data plugins from production settings --- mandelstudio/settings/base.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mandelstudio/settings/base.py b/mandelstudio/settings/base.py index a5548f6..c714f9c 100644 --- a/mandelstudio/settings/base.py +++ b/mandelstudio/settings/base.py @@ -27,6 +27,14 @@ INSTALLED_APPS = [ "mandelstudio", ] + INSTALLED_APPS +# Never allow demo-data plugins in this production project context. +def _is_demo_data_app(app_label: str) -> bool: + normalized = "".join(ch for ch in app_label.lower() if ch.isalnum()) + return "demodata" in normalized + + +INSTALLED_APPS = [app for app in INSTALLED_APPS if not _is_demo_data_app(app)] + # Route through the project URL layer so MandelStudio can override # sitemap/robots behavior while still delegating the main Ocyan routes. ROOT_URLCONF = "mandelstudio.urls"