mirror of https://github.com/searx/searx
[enh] number of search results
This commit is contained in:
parent
2cfefea06d
commit
a0cbc767e7
|
@ -1,5 +1,8 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div class="right">
|
||||
<a href="/" title="searx" class="site_link">searx</a> | Number of results: {{ number_of_results }}
|
||||
</div>
|
||||
<div class="small">
|
||||
{% include 'search.html' %}
|
||||
</div>
|
||||
|
|
|
@ -84,7 +84,12 @@ def index():
|
|||
if request.form.get('format') == 'json':
|
||||
# TODO HTTP headers
|
||||
return json.dumps({'query': query, 'results': results})
|
||||
template = render('results.html', results=results, q=query.decode('utf-8'), selected_categories=selected_categories)
|
||||
template = render('results.html'
|
||||
,results=results
|
||||
,q=query.decode('utf-8')
|
||||
,selected_categories=selected_categories
|
||||
,number_of_results=len(results)
|
||||
)
|
||||
resp = make_response(template)
|
||||
if remember_categs:
|
||||
resp.set_cookie('categories', ','.join(selected_categories))
|
||||
|
|
Loading…
Reference in New Issue