1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-19 02:40:11 +01:00

[fix] unused var removed

This commit is contained in:
asciimoo 2013-10-23 21:45:14 +02:00
parent 52516dab97
commit f48bc8b4e8

View File

@ -65,7 +65,6 @@ def index():
request_data = request.args request_data = request.args
if not request_data.get('q'): if not request_data.get('q'):
return render('index.html') return render('index.html')
selected_engines = []
selected_categories = [] selected_categories = []
for pd_name,pd in request_data.items(): for pd_name,pd in request_data.items():
if pd_name.startswith('category_'): if pd_name.startswith('category_'):
@ -81,7 +80,6 @@ def index():
query = request_data['q'].encode('utf-8') query = request_data['q'].encode('utf-8')
results = search(query, request, selected_categories) results = search(query, request, selected_categories)
if request_data.get('format') == 'json': if request_data.get('format') == 'json':
# TODO HTTP headers
return Response(json.dumps({'query': query, 'results': results}), mimetype='application/json') return Response(json.dumps({'query': query, 'results': results}), mimetype='application/json')
template = render('results.html' template = render('results.html'
,results=results ,results=results