forked from Ponysearch/Ponysearch
[enh] valid json content type
This commit is contained in:
parent
5e358ea9a9
commit
52516dab97
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@ def index():
|
||||||
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
|
# TODO HTTP headers
|
||||||
return json.dumps({'query': query, 'results': results})
|
return Response(json.dumps({'query': query, 'results': results}), mimetype='application/json')
|
||||||
template = render('results.html'
|
template = render('results.html'
|
||||||
,results=results
|
,results=results
|
||||||
,q=query.decode('utf-8')
|
,q=query.decode('utf-8')
|
||||||
|
|
Loading…
Reference in a new issue