Browse Source

[enh] /engines page added

asciimoo 11 years ago
parent
commit
8b3ca1112c
2 changed files with 32 additions and 1 deletions
  1. 26 0
      searx/templates/engines.html
  2. 6 1
      searx/webapp.py

+ 26 - 0
searx/templates/engines.html

@@ -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 %}

+ 6 - 1
searx/webapp.py

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