adds bootstrap-flask config to config.ini

This commit is contained in:
Michael Beck
2025-02-06 03:08:31 +01:00
parent dfe305272c
commit 63243dcdb9
2 changed files with 27 additions and 2 deletions

10
app.py
View File

@@ -31,7 +31,15 @@ API_KEY = config['DEFAULT']['API_KEY']
bootstrap = Bootstrap5(app)
app.config['BOOTSTRAP_BOOTSWATCH_THEME'] = 'litera'
# Move every setting from config['BOOTSTRAP'] to the root level of config
for key in config['BOOTSTRAP']:
key = key.upper()
app.config[key] = config['BOOTSTRAP'][key]
if key == 'SECRET_KEY':
continue
elif key == 'API_KEY':
continue
print(f"Loaded config: {key} = {app.config[key]}")
# Initialize the logger
logger = logging.getLogger(__name__)