mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 20:17:45 +01:00
[enh] default engine selection
This commit is contained in:
parent
15b8b7d9bb
commit
c4dfd416ad
@ -51,6 +51,8 @@ def index():
|
|||||||
for pd_name,pd in request.form.items():
|
for pd_name,pd in request.form.items():
|
||||||
if pd_name.startswith('engine_'):
|
if pd_name.startswith('engine_'):
|
||||||
selected_engines.append(pd_name[7:])
|
selected_engines.append(pd_name[7:])
|
||||||
|
if not len(selected_engines):
|
||||||
|
selected_engines = engines.keys()
|
||||||
query = request.form['q'].encode('utf-8')
|
query = request.form['q'].encode('utf-8')
|
||||||
results = search(query, request, selected_engines)
|
results = search(query, request, selected_engines)
|
||||||
return render('results.html', results=results, q=query.decode('utf-8'))
|
return render('results.html', results=results, q=query.decode('utf-8'))
|
||||||
|
Loading…
Reference in New Issue
Block a user