summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2017-01-13 22:15:11 +0100
committerAlexandre Flament <alex@al-f.net>2017-01-20 15:40:38 +0100
commit7fdfeca3a43e0e2bd8ef2dcb27cca7745edf596a (patch)
treec0f79e059929c184d3d368c2bc8bb20293b65061 /searx/webapp.py
parent57149661e4f90e5ad3a9a4c36bb5f31a1c7ec6aa (diff)
downloadsearxng-7fdfeca3a43e0e2bd8ef2dcb27cca7745edf596a.tar.gz
searxng-7fdfeca3a43e0e2bd8ef2dcb27cca7745edf596a.zip
[mod] add a __common__ template that can't be selected but that provides a common place for shared templates.
What has been moved into this template : * opensearch*.xml is always the same whatever the themes. * the text inside */about.html
Diffstat (limited to 'searx/webapp.py')
-rw-r--r--searx/webapp.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index 0b7169310..31d85ff5b 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -226,7 +226,7 @@ def get_current_theme_name(override=None):
2. cookies
3. settings"""
- if override and override in themes:
+ if override and (override in themes or override == '__common__'):
return override
theme_name = request.args.get('theme', request.preferences.get_value('theme'))
if theme_name not in themes:
@@ -501,7 +501,8 @@ def index():
results=results,
q=request.form['q'],
number_of_results=number_of_results,
- base_url=get_base_url()
+ base_url=get_base_url(),
+ override_theme='__common__',
)
return Response(response_rss, mimetype='text/xml')
@@ -722,7 +723,8 @@ def opensearch():
ret = render('opensearch.xml',
opensearch_method=method,
host=get_base_url(),
- urljoin=urljoin)
+ urljoin=urljoin,
+ override_theme='__common__')
resp = Response(response=ret,
status=200,