[fix] docs - don't add plugins twice

The PluginStore is already initalized when the application is initalized

    searx.plugins.initialize(application)

BTW: remove unneeded Flask import

Closes: https://github.com/searxng/searxng/issues/828
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2022-01-26 23:02:45 +01:00
parent 2c6bd2adf6
commit bdc28e3353
1 changed files with 3 additions and 4 deletions

View File

@ -3,7 +3,6 @@
import sys, os import sys, os
from pallets_sphinx_themes import ProjectLink from pallets_sphinx_themes import ProjectLink
from flask import Flask
from searx import get_setting from searx import get_setting
from searx.version import VERSION_STRING, GIT_URL, GIT_BRANCH from searx.version import VERSION_STRING, GIT_URL, GIT_BRANCH
@ -42,12 +41,12 @@ import searx.engines
import searx.plugins import searx.plugins
import searx.webutils import searx.webutils
# bypass a creepy check of the secret_key in searx.webapp # import searx.webapp is needed to init the engines & plugins, to init a
# (empty) secret_key is needed.
searx.settings['server']['secret_key'] = '' searx.settings['server']['secret_key'] = ''
from searx.webapp import application import searx.webapp
searx.engines.load_engines(searx.settings['engines']) searx.engines.load_engines(searx.settings['engines'])
searx.plugins.initialize(application)
jinja_contexts = { jinja_contexts = {
'searx': { 'searx': {