logo

searx

Unnamed repository; edit this file 'description' to name the repository.
commit: 879bac8adb181593989a132fabd607f50096473a
parent: 52a817f5c1e8727d9244abb156368d3cbcc0f264
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Sat, 29 Mar 2014 16:40:43 +0100

[fix] opensearch autocomplete

Diffstat:

searx/templates/opensearch.xml | 4++--
searx/webapp.py | 5+----
2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/searx/templates/opensearch.xml b/searx/templates/opensearch.xml @@ -6,7 +6,7 @@ <LongName>searx metasearch</LongName> {% if method == 'get' %} <Url type="text/html" method="get" template="{{ host }}?q={searchTerms}"/> - {% if client.autocompleter %} + {% if autocomplete %} <Url type="application/x-suggestions+json" method="get" template="{{ host }}autocompleter"> <Param name="format" value="x-suggestions" /> <Param name="q" value="{searchTerms}" /> @@ -16,7 +16,7 @@ <Url type="text/html" method="post" template="{{ host }}"> <Param name="q" value="{searchTerms}" /> </Url> - {% if client.autocompleter %} + {% if autocomplete %} <!-- TODO, POST REQUEST doesn't work --> <Url type="application/x-suggestions+json" method="get" template="{{ host }}autocompleter"> <Param name="format" value="x-suggestions" /> diff --git a/searx/webapp.py b/searx/webapp.py @@ -350,7 +350,6 @@ def preferences(): return resp return render('preferences.html', - client=settings.get('client', None), locales=settings['locales'], current_locale=get_locale(), current_language=lang or 'all', @@ -369,7 +368,6 @@ def stats(): return render( 'stats.html', stats=stats, - client=settings.get('client', None) ) @@ -392,8 +390,7 @@ def opensearch(): ret = render('opensearch.xml', method=method, - host=get_base_url(), - client=settings['client']) + host=get_base_url()) resp = Response(response=ret, status=200,