From 78df10fb55d9632ccae71d9f3b9260c7614a421c Mon Sep 17 00:00:00 2001 From: Dalf Date: Tue, 11 Aug 2020 15:24:41 +0200 Subject: [PATCH] Drop Python 2 (2/n): templates --- searx/templates/courgette/404.html | 2 +- searx/templates/legacy/404.html | 2 +- searx/templates/oscar/404.html | 2 +- searx/templates/simple/404.html | 2 +- searx/webapp.py | 2 -- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/searx/templates/courgette/404.html b/searx/templates/courgette/404.html index 9e3b8ac29..7a317f023 100644 --- a/searx/templates/courgette/404.html +++ b/searx/templates/courgette/404.html @@ -3,7 +3,7 @@

{{ _('Page not found') }}

{% autoescape false %} -

{{ _('Go to %(search_page)s.', search_page=unicode('{}').format(url_for('index'), _('search page'))) }}

+

{{ _('Go to %(search_page)s.', search_page='{}'.format(url_for('index'), _('search page'))) }}

{% endautoescape %}
{% endblock %} diff --git a/searx/templates/legacy/404.html b/searx/templates/legacy/404.html index 3e889dd21..c0fa62b00 100644 --- a/searx/templates/legacy/404.html +++ b/searx/templates/legacy/404.html @@ -3,7 +3,7 @@

{{ _('Page not found') }}

{% autoescape false %} -

{{ _('Go to %(search_page)s.', search_page=unicode('{}').format(url_for('index'), _('search page'))) }}

+

{{ _('Go to %(search_page)s.', search_page='{}'.format(url_for('index'), _('search page'))) }}

{% endautoescape %}
{% endblock %} diff --git a/searx/templates/oscar/404.html b/searx/templates/oscar/404.html index 5a50880a9..cdb31db73 100644 --- a/searx/templates/oscar/404.html +++ b/searx/templates/oscar/404.html @@ -3,7 +3,7 @@

{{ _('Page not found') }}

{% autoescape false %} -

{{ _('Go to %(search_page)s.', search_page=unicode('{}').format(url_for('index'), _('search page'))) }}

+

{{ _('Go to %(search_page)s.', search_page='{}'.format(url_for('index'), _('search page'))) }}

{% endautoescape %}
{% endblock %} diff --git a/searx/templates/simple/404.html b/searx/templates/simple/404.html index 11d604313..1a10514cc 100644 --- a/searx/templates/simple/404.html +++ b/searx/templates/simple/404.html @@ -3,7 +3,7 @@

{{ _('Page not found') }}

{% autoescape false %} -

{{ _('Go to %(search_page)s.', search_page=unicode('{}').format(url_for('index'), _('search page'))) }}

+

{{ _('Go to %(search_page)s.', search_page='{}'.format(url_for('index'), _('search page'))) }}

{% endautoescape %}
{% endblock %} diff --git a/searx/webapp.py b/searx/webapp.py index 6bc132e18..ec2968259 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -408,8 +408,6 @@ def render(template_name, override_theme=None, **kwargs): kwargs['results_on_new_tab'] = request.preferences.get_value('results_on_new_tab') - kwargs['unicode'] = str - kwargs['preferences'] = request.preferences kwargs['brand'] = brand