mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 12:10:11 +01:00
[mod] always remember selected categories
This commit is contained in:
parent
ee2a55a859
commit
7aa89ef7c6
@ -8,5 +8,4 @@
|
||||
</div>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p><div class="checkbox_container"><input type="checkbox" id="checkbox_save" name="save" checked="checked" /><label for="checkbox_save" class="cb"></label><label for="checkbox_save">remember categories</label></div></p>
|
||||
</form>
|
||||
|
@ -83,7 +83,6 @@ def index():
|
||||
selected_engines.extend(x.name for x in categories['general'])
|
||||
query = request.form['q'].encode('utf-8')
|
||||
results = search(query, request, selected_engines)
|
||||
remember_categs = True if 'save' in request.form else False
|
||||
if request.form.get('format') == 'json':
|
||||
# TODO HTTP headers
|
||||
return json.dumps({'query': query, 'results': results})
|
||||
@ -94,7 +93,6 @@ def index():
|
||||
,number_of_results=len(results)
|
||||
)
|
||||
resp = make_response(template)
|
||||
if remember_categs:
|
||||
resp.set_cookie('categories', ','.join(selected_categories))
|
||||
return resp
|
||||
return render('index.html')
|
||||
|
Loading…
Reference in New Issue
Block a user