adds bootstrap-flask config to config.ini
This commit is contained in:
10
app.py
10
app.py
@@ -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__)
|
||||
|
||||
Reference in New Issue
Block a user