[enh] /engines page added

This commit is contained in:
asciimoo 2014-01-17 16:23:23 +01:00
parent d6c8987575
commit 8b3ca1112c
2 changed files with 32 additions and 1 deletions

View file

@ -0,0 +1,26 @@
{% extends 'base.html' %}
{% block content %}
<div class="row">
<h2>Currently used search engines</h2>
<table style="width: 80%;">
<tr>
<th>Engine name</th>
<th>Category</th>
</tr>
{% for (categ,search_engines) in categs %}
{% for search_engine in search_engines %}
{% if not search_engine.private %}
<tr>
<td>{{ search_engine.name }}</td>
<td>{{ categ }}</td>
</tr>
{% endif %}
{% endfor %}
{% endfor %}
</table>
<p>Please add more engines to this list, pull requests are welcome!</p>
<p class="right"><a href="/">back</a></p>
</div>
{% endblock %}

View file

@ -174,8 +174,13 @@ def index():
@app.route('/about', methods=['GET']) @app.route('/about', methods=['GET'])
def about(): def about():
return render('about.html')
@app.route('/engines', methods=['GET'])
def list_engines():
global categories global categories
return render('about.html', categs=categories.items()) return render('engines.html', categs=categories.items())
@app.route('/preferences', methods=['GET', 'POST']) @app.route('/preferences', methods=['GET', 'POST'])