From 798bef77f9b43e713aeb9ac2938785538538a99c Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Thu, 1 Jan 2015 19:24:47 +0100 Subject: [PATCH] [fix] static content paths --- searx/templates/courgette/result_templates/default.html | 2 +- searx/templates/default/result_templates/default.html | 2 +- searx/templates/oscar/result_templates/default.html | 2 +- searx/tests/test_webapp.py | 2 +- searx/webapp.py | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/searx/templates/courgette/result_templates/default.html b/searx/templates/courgette/result_templates/default.html index b46f95e9f..710b0a8e7 100644 --- a/searx/templates/courgette/result_templates/default.html +++ b/searx/templates/courgette/result_templates/default.html @@ -1,7 +1,7 @@
{% if "icon_"~result.engine~".ico" in favicons %} - {{result.engine}} + {{result.engine}} {% endif %}
diff --git a/searx/templates/default/result_templates/default.html b/searx/templates/default/result_templates/default.html index 73e9af1a9..85882e56a 100644 --- a/searx/templates/default/result_templates/default.html +++ b/searx/templates/default/result_templates/default.html @@ -1,5 +1,5 @@
-

{% if "icon_"~result.engine~".ico" in favicons %}{{result.engine}}{% endif %}{{ result.title|safe }}

+

{% if "icon_"~result.engine~".ico" in favicons %}{{result.engine}}{% endif %}{{ result.title|safe }}

{{ result.pretty_url }} cached

{% if result.publishedDate %}

{{ result.publishedDate }}

{% endif %}

{% if result.img_src %}{% endif %}{% if result.content %}{{ result.content|safe }}
{% endif %}

diff --git a/searx/templates/oscar/result_templates/default.html b/searx/templates/oscar/result_templates/default.html index 3c8e6255d..b84430814 100644 --- a/searx/templates/oscar/result_templates/default.html +++ b/searx/templates/oscar/result_templates/default.html @@ -1,6 +1,6 @@ {% from 'oscar/macros.html' import icon %} -

{% if result.engine~".png" in favicons %}{{ result.engine }} {% endif %}{{ result.title|safe }}

+

{% if result.engine~".png" in favicons %}{{ result.engine }} {% endif %}{{ result.title|safe }}

{% if result.publishedDate %}{% endif %} {{ icon('link') }} {{ _('cached') }} diff --git a/searx/tests/test_webapp.py b/searx/tests/test_webapp.py index a979e786d..d26b75e8f 100644 --- a/searx/tests/test_webapp.py +++ b/searx/tests/test_webapp.py @@ -49,7 +49,7 @@ class ViewsTestCase(SearxTestCase): ) result = self.app.post('/', data={'q': 'test'}) self.assertIn( - '

youtubeSecond Test

', # noqa + '

youtubeSecond Test

', # noqa result.data ) self.assertIn( diff --git a/searx/webapp.py b/searx/webapp.py index fca42d48e..6ee9af745 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -73,7 +73,7 @@ babel = Babel(app) global_favicons = [] for indice, theme in enumerate(themes): global_favicons.append([]) - theme_img_path = searx_dir+"/static/"+theme+"/img/icons/" + theme_img_path = searx_dir+"/static/themes/"+theme+"/img/icons/" for (dirpath, dirnames, filenames) in os.walk(theme_img_path): global_favicons[indice].extend(filenames) @@ -506,7 +506,7 @@ def opensearch(): @app.route('/favicon.ico') def favicon(): return send_from_directory(os.path.join(app.root_path, - 'static', + 'static/themes', get_current_theme_name(), 'img'), 'favicon.png',