diff options
| author | asciimoo <asciimoo@gmail.com> | 2013-10-21 00:28:48 +0200 |
|---|---|---|
| committer | asciimoo <asciimoo@gmail.com> | 2013-10-21 00:28:48 +0200 |
| commit | 9ead6546a431f78e887c47f130be54a4893d2a1f (patch) | |
| tree | f1dec6e0a0e27cae3773c0f320d02f6ac36426ee /searx/webapp.py | |
| parent | 0b28f3fe6a0faf76783a0cf63b41773db27d61d6 (diff) | |
[enh] about page added
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 fd208504b..3c3984571 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -22,7 +22,7 @@ if __name__ == "__main__": from os.path import realpath, dirname path.append(realpath(dirname(realpath(__file__))+'/../')) -from flask import Flask, request, flash, render_template, url_for, Response, make_response +from flask import Flask, request, render_template, url_for, Response, make_response from searx.engines import search, categories from searx import settings import json @@ -102,10 +102,16 @@ def index(): def fav(): return '' +@app.route('/about', methods=['GET']) +def about(): + global categories + return render('about.html', categs=categories.items()) + @app.route('/opensearch.xml', methods=['GET']) def opensearch(): global opensearch_xml method = 'post' + # chrome/chromium only supports HTTP GET.... if request.headers.get('User-Agent', '').lower().find('webkit') >= 0: method = 'get' ret = opensearch_xml.format(method=method, host=url_for('index', _external=True)) |