From d80b6cf490c935fe2edda6dac562843ab5e44cbd Mon Sep 17 00:00:00 2001 From: PCoder Date: Mon, 7 Jan 2019 22:30:52 +0100 Subject: [PATCH] Introduce UNGLEICH_BLOG_SITE_ID - It should be initialized with the SITE_ID of the site that hosts the blog - Without this, django_parler is unhappy to show EN/DE options when creating blog articles See redmine issue #4465 --- dynamicweb/settings/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index 7d62ceb5..23e17bca 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -56,7 +56,9 @@ dotenv.read_dotenv("{0}/.env".format(PROJECT_DIR)) from multisite import SiteID -SITE_ID = SiteID(default=1) +UNGLEICH_BLOG_SITE_ID = int_env("UNGLEICH_BLOG_SITE_ID") +SITE_ID = SiteID(default=(UNGLEICH_BLOG_SITE_ID if + UNGLEICH_BLOG_SITE_ID > 0 else 1)) APP_ROOT_ENDPOINT = "/" APPEND_SLASH = True