Commit Graph

18 Commits (ba8959ad7c18ce4165d29b7a472d845bd96f4735)

Author SHA1 Message Date
Markus Heiser ba8959ad7c [fix] typos / reported by @kianmeng in searx PR-3366
[PR-3366] https://github.com/searx/searx/pull/3366

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2 years ago
Alexandre Flament d6446be38f [mod] science category: various update of about PR 1705 2 years ago
Alexandre FLAMENT a96f503d7b Add searx.webutils.searxng_format_date
* Move the datetime to str code from searx.webapp.search to searx.webutils.searxng_format_date
* When the month, day, hour, day and second are zero, the function returns only the year.
2 years ago
Alexandre Flament 9b3efa6d8a theme: remove __common__ 2 years ago
Alexandre Flament 1c7d8815fb [mod] URL for the static file contains the sha1
* allow to cache the static file forever
* avoid bugs when the static files are updated but not reloaded
2 years ago
Martin Fischer a4c2cfb837 [enh] change categories_as_tabs from a list to a dict
The tab icon names are currently hard coded in the templates.
This commit lets us introduce an icon property in the future, e.g:

categories_as_tabs:
  general:
    icon: search-outline
2 years ago
Martin Fischer 3dd534e5c0 [refactor] make group_engines_in_tab more readable 2 years ago
Martin Fischer 6f07d51b62 [mod] improve variable name 2 years ago
Martin Fischer 1e195f5b95 [mod] move group_engines_in_tab to searx.webutils 2 years ago
Markus Heiser 8f3a7feb47 [mod] implement is_hmac_of() in webutils / close to new_hmac()
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>, Alexandre Flament
2 years ago
Alexandre Flament 7d4834ac4d [mod] webutils.py: remove dead code
secret_key can't be bytes (see settings_default.py)
2 years ago
Markus Heiser 3d96a9839a [format.python] initial formatting of the python code
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>
2 years ago
Alexandre Flament 4b07df62e5 [mod] move all default settings into searx.settings_defaults 3 years ago
Daniel Hones 138f32471c Updated webutils.highlight_content to ignore double-quotes when highlighting query parts 3 years ago
Alexandre Flament 584760cf54
Merge pull request #2237 from dalf/mod-engines-init
Mod engines init
4 years ago
Alexandre Flament 6c39917c4d [mod] webapp.py: update engines initialization condition
Always call initialize engines except on the first run of werkzeug with the reload feature.

the reload feature is activated when:
* searx_debug is True (SEARX_DEBUG environment variable or settings.yml)
* FLASK_APP=searx/webapp.py FLASK_ENV=development flask run (see https://flask.palletsprojects.com/en/1.1.x/cli/ )

Fix SEARX_DEBUG=0 make docs
docs/admin/engines.rst : engines are initialized
See https://github.com/searx/searx/issues/2204#issuecomment-701373438
4 years ago
Alexandre Flament 507896c115 [mod] preferences.py: check language setting with a regex instead of match_language 4 years ago
Alexandre Flament ad0758e52a [mod] add searx/webutils.py
contains utility functions and classes used only by webapp.py
4 years ago