mirror of
https://github.com/searxng/searxng.git
synced 2024-11-17 18:00:12 +01:00
[enh] view for stats
This commit is contained in:
parent
3c3d9b0467
commit
66d9619862
@ -23,7 +23,7 @@ if __name__ == "__main__":
|
|||||||
path.append(realpath(dirname(realpath(__file__))+'/../'))
|
path.append(realpath(dirname(realpath(__file__))+'/../'))
|
||||||
|
|
||||||
from flask import Flask, request, 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.engines import search, categories, get_engines_stats
|
||||||
from searx import settings
|
from searx import settings
|
||||||
import json
|
import json
|
||||||
|
|
||||||
@ -105,6 +105,12 @@ def about():
|
|||||||
global categories
|
global categories
|
||||||
return render('about.html', categs=categories.items())
|
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'])
|
@app.route('/opensearch.xml', methods=['GET'])
|
||||||
def opensearch():
|
def opensearch():
|
||||||
global opensearch_xml
|
global opensearch_xml
|
||||||
|
Loading…
Reference in New Issue
Block a user