summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
authorMatej Cotman <cotman.matej@gmail.com>2014-01-31 07:08:24 +0100
committerMatej Cotman <cotman.matej@gmail.com>2014-01-31 07:36:58 +0100
commit2bcc949abe592f195000f43368c3798f4bce2dbb (patch)
tree41a91f532c4fa0abf0d3cdc66aa6332232767256 /searx/webapp.py
parent3a2b9a86829e1a7f9bae1d3f3f69fc3bbb38cd93 (diff)
add view tests
Diffstat (limited to 'searx/webapp.py')
-rw-r--r--searx/webapp.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index f8ef27322..dc34567cb 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -117,6 +117,10 @@ def parse_query(query):
@app.route('/', methods=['GET', 'POST'])
def index():
+ """Render index page.
+
+ Supported outputs: html, json, csv, rss.
+ """
paging = False
lang = 'all'
@@ -231,17 +235,25 @@ def index():
@app.route('/about', methods=['GET'])
def about():
+ """Render about page"""
return render('about.html')
@app.route('/engines', methods=['GET'])
def list_engines():
+ """Render engines page.
+
+ List of all supported engines.
+ """
global categories
return render('engines.html', categs=categories.items())
@app.route('/preferences', methods=['GET', 'POST'])
def preferences():
+ """Render preferences page.
+
+ Settings that are going to be saved as cookies."""
lang = None
if request.cookies.get('language')\
@@ -296,6 +308,7 @@ def preferences():
@app.route('/stats', methods=['GET'])
def stats():
+ """Render engine statistics page."""
global categories
stats = get_engines_stats()
return render('stats.html', stats=stats)