From 48dc019b94cd171cb69cd8d4cd4ac89d18900ec4 Mon Sep 17 00:00:00 2001 From: asciimoo Date: Fri, 31 Jan 2014 16:09:58 +0100 Subject: [PATCH] [enh] displaying shortcuts at engines page --- searx/templates/engines.html | 2 ++ searx/webapp.py | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/searx/templates/engines.html b/searx/templates/engines.html index 8a7aaf4a0..613023a83 100644 --- a/searx/templates/engines.html +++ b/searx/templates/engines.html @@ -6,6 +6,7 @@ + {% for (categ,search_engines) in categs %} @@ -14,6 +15,7 @@ {% if not search_engine.private %} + {% endif %} diff --git a/searx/webapp.py b/searx/webapp.py index 49580911d..347ee969d 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -250,8 +250,9 @@ def list_engines(): List of all supported engines. """ - global categories - return render('engines.html', categs=categories.items()) + return render('engines.html', + categs=categories.items(), + shortcuts={y:x for x,y in engine_shortcuts.items()}) @app.route('/preferences', methods=['GET', 'POST'])
{{ _('Engine name') }}{{ _('Shortcut') }} {{ _('Category') }}
{{ search_engine.name }}{{ shortcuts[search_engine.name] }} {{ _(categ) }}