mirror of
https://github.com/WGDashboard/WGDashboard-PRW.git
synced 2026-12-01 17:07:41 +00:00
chore: update files
This commit is contained in:
+5
-4
@@ -8,7 +8,7 @@ import json
|
||||
import os
|
||||
import secrets
|
||||
|
||||
from modules.config.reader import reader
|
||||
from modules.config.config import config
|
||||
from modules.database.database import database
|
||||
|
||||
from modules.utilities.utilities import utilities as util
|
||||
@@ -18,17 +18,17 @@ from modules.routes.routes import routes
|
||||
|
||||
if __name__ == '__main__':
|
||||
# Read the config file (ini)
|
||||
ok, config_contents = reader.read_config()
|
||||
ok, config_contents = config.read()
|
||||
if not ok:
|
||||
exit(1)
|
||||
found, config_server = util.filter_config(config_contents, 'SERVER')
|
||||
found, config_server = config.filter(config_contents, 'SERVER')
|
||||
|
||||
# Configure the loglevel of WGDashboard
|
||||
wanted_loglevel = config_server.get('log_level', 'DEBUG').upper()
|
||||
setup_logger(wanted_loglevel)
|
||||
|
||||
# Get the database configuration from thee config
|
||||
found, config_database = util.filter_config(config_contents, 'DATABASE')
|
||||
found, config_database = config.filter(config_contents, 'DATABASE')
|
||||
if not found:
|
||||
exit(1)
|
||||
|
||||
@@ -46,6 +46,7 @@ if __name__ == '__main__':
|
||||
app.register_blueprint(routes, url_prefix=prefix)
|
||||
|
||||
app.wgd_config = config_contents
|
||||
app.locale_path = './static/locales/'
|
||||
|
||||
app.secret_key = secrets.token_urlsafe(64)
|
||||
app.config['SESSION_TYPE'] = 'filesystem'
|
||||
|
||||
Reference in New Issue
Block a user