mirror of
https://github.com/searxng/searxng.git
synced 2025-07-23 21:29:21 +02:00
[fix] brands: add variables from build env to jinja templating
We have some variables in the build environment which are also needed in the templating process. Theses variables are relavant if one creates a fork with its own branding. We treat these variables under the term 'brands'. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
9a2f26d915
commit
04c687403e
7 changed files with 29 additions and 19 deletions
3
searx/webapp.py
Normal file → Executable file
3
searx/webapp.py
Normal file → Executable file
|
@ -57,6 +57,7 @@ from babel.support import Translations
|
|||
import flask_babel
|
||||
from flask_babel import Babel, gettext, format_date, format_decimal
|
||||
from flask.json import jsonify
|
||||
from searx import brand
|
||||
from searx import settings, searx_dir, searx_debug
|
||||
from searx.exceptions import SearxParameterException
|
||||
from searx.engines import (
|
||||
|
@ -427,6 +428,8 @@ def render(template_name, override_theme=None, **kwargs):
|
|||
|
||||
kwargs['preferences'] = request.preferences
|
||||
|
||||
kwargs['brand'] = brand
|
||||
|
||||
kwargs['scripts'] = set()
|
||||
for plugin in request.user_plugins:
|
||||
for script in plugin.js_dependencies:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue