summaryrefslogtreecommitdiff
path: root/searx/settings_loader.py
AgeCommit message (Collapse)Author
2023-04-03[fix] categories can't be removed from UI (categories_as_tabs)Markus Heiser
When using ``use_default_settings: true``, removing default categories from settings.yml will not remove them from the UI. The value ``categories_as_tabs`` is a dictionary type (a4c2cfb) and dictionary types are merged additive by ``settings_loader.update_settings()``. This patch replaces the default ``categories_as_tabs`` by the one from the ``user_settings``. Related: https://github.com/searxng/searxng/issues/1019#issuecomment-1193145654 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-09-27[fix] typos / reported by @kianmeng in searx PR-3366Markus Heiser
[PR-3366] https://github.com/searx/searx/pull/3366 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-08-28Remove usage of SEARX environment variablesAlexandre FLAMENT
2021-12-27[format.python] initial formatting of the python codeMarkus Heiser
This patch was generated by black [1]:: make format.python [1] https://github.com/psf/black Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-10-11SearXNG: load /etc/searxng/settings.ymlAlexandre Flament
fall back to /etc/searx/setting.yml
2021-10-02SearXNG: environment variablesAlexandre Flament
2021-05-18[fix] unit test: don't load /etc/searx/settings.ymlAlexandre Flament
Add a new environment variable SEARX_DISABLE_ETC_SETTINGS to disable loading of /etc/searx/settings.yml unit tests: * set SEARX_DISABLE_ETC_SETTINGS to 1 * remove SEARX_SETTINGS_PATH if it exists
2021-04-05[fix] settings_loader.py - use update_dict only for mapping typesMarkus Heiser
I can't set `default_doi_resolver` in `settings.yml` if I'm using `use_default_settings`. Searx seems to try to interpret all settings at root level in `settings.yml` as dict, which is correct except for `default_doi_resolver` which is at root level and a string:: File "/usr/lib/python3.9/site-packages/searx/settings_loader.py", line 125, in load_settings update_settings(default_settings, user_settings) File "/usr/lib/python3.9/site-packages/searx/settings_loader.py", line 61, in update_settings update_dict(default_settings[k], v) File "/usr/lib/python3.9/site-packages/searx/settings_loader.py", line 48, in update_dict for k, v in user_dict.items(): AttributeError: 'str' object has no attribute 'items' Signed-off-by: Markus Heiser <markus@darmarit.de> Suggested-by: @0xhtml https://github.com/searx/searx/issues/2722#issuecomment-813391659
2020-12-20[fix] pylint: use "raise ... from ..."Alexandre Flament
2020-12-03[fix] settings_loader: don't crash when a key exists only in the user settingsAlexandre Flament
typical use case: result_proxy can be defined in the user settings, but are not defined the default settings.yml
2020-11-27[enh] settings.yml: add use_default_settings option (2nd version)Alexandre Flament