UI - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: верхняя панель, rich filters и runtime-fix DEBUG=release

This commit is contained in:
DCCONSTRUCTIONS
2026-04-19 23:46:31 +03:00
parent b1912c64e9
commit ae124e50e5
27 changed files with 384 additions and 149 deletions
+15 -1
View File
@@ -23,11 +23,25 @@ from plane.utils.url import is_valid_url
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def env_flag(value, default=False):
if value is None:
return default
normalized = str(value).strip().lower()
if normalized in {"1", "true", "yes", "on", "debug"}:
return True
if normalized in {"0", "false", "no", "off", "release", "prod", "production"}:
return False
return default
# Secret Key
SECRET_KEY = os.environ.get("SECRET_KEY", get_random_secret_key())
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = int(os.environ.get("DEBUG", "0"))
DEBUG = env_flag(os.environ.get("DEBUG", "0"))
# Self-hosted mode
IS_SELF_MANAGED = True
@@ -9,7 +9,7 @@ import os
from .common import * # noqa
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = int(os.environ.get("DEBUG", 0)) == 1
DEBUG = env_flag(os.environ.get("DEBUG", 0), default=False)
# Honor the 'X-Forwarded-Proto' header for request.is_secure()
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")