AstroJS/botanjs/config.py
斟酌 鵬兄 b0ecbe42c3 Various bug fix due to CSP headers
SiteLibrary added name display on album view
Optimizations & removed some obsolete files
2022-04-09 20:47:11 +08:00

16 lines
421 B
Python

#!/usr/bin/env python3
import configparser, os
Config = configparser.ConfigParser( interpolation = configparser.ExtendedInterpolation() )
Config.read( "settings.ini" )
DEBUG = os.getenv( "DEBUG" )
if DEBUG is None:
DEBUG = Config[ "Env" ][ "Debug" ]
else:
Config[ "Env" ][ "Debug" ] = str( DEBUG == "1" )
REDIS_CONN = os.getenv( "REDIS_CONN" )
if not REDIS_CONN is None:
Config[ "Redis" ][ "ConnStr" ] = REDIS_CONN