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__)
|
||||
|
||||
@@ -10,4 +10,21 @@ VIEW_MAX_LINES = 500
|
||||
# Number of lines to display per page in the log viewer
|
||||
VIEW_PAGE_LINES = 50
|
||||
# Number of bytes to read at a time
|
||||
TAIL_PAGE_SIZE = 100
|
||||
TAIL_PAGE_SIZE = 100
|
||||
|
||||
[BOOTSTRAP]
|
||||
# See:
|
||||
# https://bootstrap-flask.readthedocs.io/en/stable/basic/#configurations
|
||||
BOOTSTRAP_SERVE_LOCAL = False
|
||||
BOOTSTRAP_BTN_STYLE = 'primary'
|
||||
BOOTSTRAP_BTN_SIZE = 'sm'
|
||||
BOOTSTRAP_ICON_SIZE = '1em'
|
||||
BOOTSTRAP_ICON_COLOR = None
|
||||
BOOTSTRAP_BOOTSWATCH_THEME = litera
|
||||
BOOTSTRAP_MSG_CATEGORY = 'primary'
|
||||
BOOTSTRAP_TABLE_VIEW_TITLE = 'View'
|
||||
BOOTSTRAP_TABLE_EDIT_TITLE = 'Edit'
|
||||
BOOTSTRAP_TABLE_DELETE_TITLE = 'Delete'
|
||||
BOOTSTRAP_TABLE_NEW_TITLE = 'New'
|
||||
BOOTSTRAP_FORM_GROUP_CLASSES = 'mb-3'
|
||||
BOOTSTRAP_FORM_INLINE_CLASSES = 'row row-cols-lg-auto g-3 align-items-center'
|
||||
Reference in New Issue
Block a user