[enh] settings.yml: add use_default_settings option (2nd version)

This commit is contained in:
Alexandre Flament 2020-11-27 19:32:45 +01:00
parent 1cfe7f2a75
commit b4b81a5e1a
14 changed files with 441 additions and 253 deletions

View file

@ -16,7 +16,7 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
'''
import logging
import searx.settings
import searx.settings_loader
from os import environ
from os.path import realpath, dirname, join, abspath, isfile
@ -24,7 +24,7 @@ from os.path import realpath, dirname, join, abspath, isfile
searx_dir = abspath(dirname(__file__))
engine_dir = dirname(realpath(__file__))
static_path = abspath(join(dirname(__file__), 'static'))
settings, settings_load_message = searx.settings.load_settings()
settings, settings_load_message = searx.settings_loader.load_settings()
if settings['ui']['static_path']:
static_path = settings['ui']['static_path']