Browse Source

[enh] search form @ results page

asciimoo 11 years ago
parent
commit
62f6d34b95
2 changed files with 5 additions and 2 deletions
  1. 4 1
      searx/templates/results.html
  2. 1 1
      searx/webapp.py

+ 4 - 1
searx/templates/results.html

@@ -1,6 +1,9 @@
 {% extends "base.html" %}
 {% block content %}
-<h1>searx</h1>
+<form method="post" action="">
+    <input type="text" name="q" value="{{ q }}"/>
+    <input type="submit" value="search" />
+</form>
 {% for result in results %}
     <p>{{ result|safe }}</p>
 {% endfor %}

+ 1 - 1
searx/webapp.py

@@ -57,7 +57,7 @@ def index():
                                     )
             requests.append(req)
         grequests.map(requests)
-        return render_template('results.html', results=results)
+        return render_template('results.html', results=results, q=query)
 
 
     return render_template('index.html')