Toggle map-show
Deploy PBT / deploy (push) Successful in 16s

This commit is contained in:
2026-09-11 16:04:53 +02:00
parent c9f298223b
commit 039e2905dd
6 changed files with 84 additions and 35 deletions
+14
View File
@@ -1,5 +1,13 @@
import os
def _bool_env(name: str, default: bool) -> bool:
raw = os.environ.get(name)
if raw is None:
return default
return raw.strip().lower() in ("1", "true", "yes", "on")
class Config:
# Beispiel: postgresql://pbt_app:PASSWORT@10.10.10.x/pbt
SQLALCHEMY_DATABASE_URI = os.environ.get(
@@ -8,3 +16,9 @@ class Config:
)
SQLALCHEMY_TRACK_MODIFICATIONS = False
SECRET_KEY = os.environ.get("PBT_SECRET_KEY", "bitte-in-produktion-aendern")
# Route preview map (Leaflet/OSM) on the trip form and "Meine Fahrten".
# Off by default: without real route geometry it only draws a straight
# line between stops, which isn't worth the extra page weight/CDN calls
# for most setups. Set PBT_SHOW_MAP=true to turn it on.
SHOW_MAP = _bool_env("PBT_SHOW_MAP", True)