Filter demo-data plugins from production settings

This commit is contained in:
2026-04-09 01:01:46 +02:00
parent fb55d59b77
commit 4648b7b0b3

View File

@@ -27,6 +27,14 @@ INSTALLED_APPS = [
"mandelstudio", "mandelstudio",
] + INSTALLED_APPS ] + 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 # Route through the project URL layer so MandelStudio can override
# sitemap/robots behavior while still delegating the main Ocyan routes. # sitemap/robots behavior while still delegating the main Ocyan routes.
ROOT_URLCONF = "mandelstudio.urls" ROOT_URLCONF = "mandelstudio.urls"