diff options
author | Martin Fischer <martin@push-f.com> | 2021-12-28 16:12:54 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2022-01-05 11:03:44 +0100 |
commit | ab90e2ac49778153409397d4a2c34e9051963a0f (patch) | |
tree | 811c93fa0466b0e3796a5032a5bdfea8a665b285 /searx/webapp.py | |
parent | 4ac6b5d32dc60ce410eb7166722c86e82f8c937c (diff) | |
download | searxng-ab90e2ac49778153409397d4a2c34e9051963a0f.tar.gz searxng-ab90e2ac49778153409397d4a2c34e9051963a0f.zip |
[enh] show categories not in any tab category in "Other" preferences tab
Previously we didn't have a good place to put search engines that don't
fit into any of the tab categories. This commit automatically puts
search engines that don't belong to any tab category in an "other"
category, that is only displayed in the user preferences (and not above
search results).
Diffstat (limited to 'searx/webapp.py')
-rwxr-xr-x | searx/webapp.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 9ce7b9d5a..c0467932e 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -59,6 +59,7 @@ from searx.settings_defaults import OUTPUT_FORMATS from searx.settings_loader import get_default_settings_path from searx.exceptions import SearxParameterException from searx.engines import ( + OTHER_CATEGORY, DEFAULT_GROUP_NAME, categories, engines, @@ -182,6 +183,7 @@ _category_names = ( gettext('software wikis'), gettext('web'), gettext(DEFAULT_GROUP_NAME), + gettext(OTHER_CATEGORY), ) _simple_style = (gettext('auto'), gettext('light'), gettext('dark')) @@ -439,6 +441,7 @@ def render(template_name, override_theme=None, **kwargs): kwargs['theme'] = get_current_theme_name(override=override_theme) kwargs['categories_as_tabs'] = settings['categories_as_tabs'] kwargs['categories'] = _get_enable_categories(categories.keys()) + kwargs['OTHER_CATEGORY'] = OTHER_CATEGORY # i18n kwargs['language_codes'] = [l for l in languages if l[0] in settings['search']['languages']] |