forked from Ponysearch/Ponysearch
[enh] default engine selection
This commit is contained in:
parent
15b8b7d9bb
commit
c4dfd416ad
1 changed files with 2 additions and 0 deletions
|
@ -51,6 +51,8 @@ def index():
|
|||
for pd_name,pd in request.form.items():
|
||||
if pd_name.startswith('engine_'):
|
||||
selected_engines.append(pd_name[7:])
|
||||
if not len(selected_engines):
|
||||
selected_engines = engines.keys()
|
||||
query = request.form['q'].encode('utf-8')
|
||||
results = search(query, request, selected_engines)
|
||||
return render('results.html', results=results, q=query.decode('utf-8'))
|
||||
|
|
Loading…
Reference in a new issue