git status! RFACTOR TEMPLATE git status!
This commit is contained in:
13
app.py
13
app.py
@@ -691,6 +691,19 @@ def get_data_folder_size():
|
||||
pass
|
||||
return total_size
|
||||
|
||||
@app.template_global()
|
||||
def bootstrap_alert_category(cat):
|
||||
mapping = {
|
||||
"error": "danger",
|
||||
"fail": "danger",
|
||||
"warn": "warning",
|
||||
"warning": "warning",
|
||||
"ok": "success",
|
||||
"success": "success",
|
||||
"info": "info"
|
||||
}
|
||||
return mapping.get(cat.lower(), "info")
|
||||
|
||||
###############################################################################
|
||||
# ROUTES
|
||||
###############################################################################
|
||||
|
Reference in New Issue
Block a user