@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user