diff options
| author | asciimoo <asciimoo@gmail.com> | 2013-10-27 01:03:05 +0200 |
|---|---|---|
| committer | asciimoo <asciimoo@gmail.com> | 2013-10-27 01:03:05 +0200 |
| commit | 66d961986271656da4d81c85395d0c4c8712f08d (patch) | |
| tree | 184f9f19ed5d37e7833b78723e9cd59ab4c304e0 /searx/webapp.py | |
| parent | 3c3d9b0467e358e3edadeaafa9611693a093b356 (diff) | |
[enh] view for stats
Diffstat (limited to 'searx/webapp.py')
| -rw-r--r-- | searx/webapp.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 84835b826..a57702713 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -23,7 +23,7 @@ if __name__ == "__main__": path.append(realpath(dirname(realpath(__file__))+'/../')) from flask import Flask, request, render_template, url_for, Response, make_response -from searx.engines import search, categories +from searx.engines import search, categories, get_engines_stats from searx import settings import json @@ -105,6 +105,12 @@ def about(): global categories return render('about.html', categs=categories.items()) +@app.route('/stats', methods=['GET']) +def stats(): + global categories + stats = get_engines_stats() + return render('stats.html', stats=stats) + @app.route('/opensearch.xml', methods=['GET']) def opensearch(): global opensearch_xml |