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 View File

1
+{% extends 'base.html' %}
2
+{% block content %}
3
+<div class="row">
4
+<h2>Currently used search engines</h2>
5
+
6
+    <table style="width: 80%;">
7
+        <tr>
8
+            <th>Engine name</th>
9
+            <th>Category</th>
10
+        </tr>
11
+    {% for (categ,search_engines) in categs %}
12
+        {% for search_engine in search_engines %}
13
+
14
+            {% if not search_engine.private %}
15
+            <tr>
16
+                <td>{{ search_engine.name }}</td>
17
+                <td>{{ categ }}</td>
18
+            </tr>
19
+            {% endif %}
20
+        {% endfor %}
21
+    {% endfor %}
22
+    </table>
23
+<p>Please add more engines to this list, pull requests are welcome!</p>
24
+<p class="right"><a href="/">back</a></p>
25
+</div>
26
+{% endblock %}

+ 6
- 1
searx/webapp.py View File

174
 
174
 
175
 @app.route('/about', methods=['GET'])
175
 @app.route('/about', methods=['GET'])
176
 def about():
176
 def about():
177
+    return render('about.html')
178
+
179
+
180
+@app.route('/engines', methods=['GET'])
181
+def list_engines():
177
     global categories
182
     global categories
178
-    return render('about.html', categs=categories.items())
183
+    return render('engines.html', categs=categories.items())
179
 
184
 
180
 
185
 
181
 @app.route('/preferences', methods=['GET', 'POST'])
186
 @app.route('/preferences', methods=['GET', 'POST'])