feat(client): add STATION_CODE env var and config attribute
Reads STATION_CODE from the environment and exposes it as Config.STATION_CODE (None when unset or empty). Adds the variable to .env.example with a per-station deployment note, and covers both read and missing-key paths with new pytest tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,10 @@ class Config:
|
||||
PERMANENT_SESSION_LIFETIME = 28800 # 8 hours
|
||||
WTF_CSRF_TIME_LIMIT = 3600 # 1 hour
|
||||
|
||||
# Station identity: each deployed client container sets this to the station
|
||||
# code it belongs to. Empty/None means "not configured".
|
||||
STATION_CODE: str | None = os.getenv("STATION_CODE") or None
|
||||
|
||||
# Babel i18n
|
||||
BABEL_DEFAULT_LOCALE = "it"
|
||||
BABEL_DEFAULT_TIMEZONE = "Europe/Rome"
|
||||
|
||||
Reference in New Issue
Block a user