on master help sign in
[enh] displaying shortcuts at engines page
commit48dc019b94cd171cb69cd8d4cd4ac89d18900ec4 authorasciimoo <asciimoo@gmail.com> dateFri 31 Jan 2014, 16:09 (13 years ago) parentaf6e900
2 files changed+5−2
searx/templates/engines.html+2 searx/webapp.py+3−2
searx/templates/engines.html+2
@@ -6,6 +6,7 @@
66 <table style="width: 80%;">
77 <tr>
88 <th>{{ _('Engine name') }}</th>
9+ <th>{{ _('Shortcut') }}</th>
910 <th>{{ _('Category') }}</th>
1011 </tr>
1112 {% for (categ,search_engines) in categs %}
@@ -14,6 +15,7 @@
1415 {% if not search_engine.private %}
1516 <tr>
1617 <td>{{ search_engine.name }}</td>
18+ <td>{{ shortcuts[search_engine.name] }}</td>
1719 <td>{{ _(categ) }}</td>
1820 </tr>
1921 {% endif %}
searx/webapp.py+3−2
@@ -250,8 +250,9 @@ def list_engines():
250250
251251 List of all supported engines.
252252 """
253− global categories
254− return render('engines.html', categs=categories.items())
253+ return render('engines.html',
254+ categs=categories.items(),
255+ shortcuts={y:x for x,y in engine_shortcuts.items()})
255256
256257
257258@app.route('/preferences', methods=['GET', 'POST'])