forked from Ponysearch/Ponysearch
[fix] opensearch autocomplete
This commit is contained in:
parent
52a817f5c1
commit
879bac8adb
2 changed files with 3 additions and 6 deletions
|
@ -6,7 +6,7 @@
|
||||||
<LongName>searx metasearch</LongName>
|
<LongName>searx metasearch</LongName>
|
||||||
{% if method == 'get' %}
|
{% if method == 'get' %}
|
||||||
<Url type="text/html" method="get" template="{{ host }}?q={searchTerms}"/>
|
<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">
|
<Url type="application/x-suggestions+json" method="get" template="{{ host }}autocompleter">
|
||||||
<Param name="format" value="x-suggestions" />
|
<Param name="format" value="x-suggestions" />
|
||||||
<Param name="q" value="{searchTerms}" />
|
<Param name="q" value="{searchTerms}" />
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
<Url type="text/html" method="post" template="{{ host }}">
|
<Url type="text/html" method="post" template="{{ host }}">
|
||||||
<Param name="q" value="{searchTerms}" />
|
<Param name="q" value="{searchTerms}" />
|
||||||
</Url>
|
</Url>
|
||||||
{% if client.autocompleter %}
|
{% if autocomplete %}
|
||||||
<!-- TODO, POST REQUEST doesn't work -->
|
<!-- TODO, POST REQUEST doesn't work -->
|
||||||
<Url type="application/x-suggestions+json" method="get" template="{{ host }}autocompleter">
|
<Url type="application/x-suggestions+json" method="get" template="{{ host }}autocompleter">
|
||||||
<Param name="format" value="x-suggestions" />
|
<Param name="format" value="x-suggestions" />
|
||||||
|
|
|
@ -350,7 +350,6 @@ def preferences():
|
||||||
|
|
||||||
return resp
|
return resp
|
||||||
return render('preferences.html',
|
return render('preferences.html',
|
||||||
client=settings.get('client', None),
|
|
||||||
locales=settings['locales'],
|
locales=settings['locales'],
|
||||||
current_locale=get_locale(),
|
current_locale=get_locale(),
|
||||||
current_language=lang or 'all',
|
current_language=lang or 'all',
|
||||||
|
@ -369,7 +368,6 @@ def stats():
|
||||||
return render(
|
return render(
|
||||||
'stats.html',
|
'stats.html',
|
||||||
stats=stats,
|
stats=stats,
|
||||||
client=settings.get('client', None)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -392,8 +390,7 @@ def opensearch():
|
||||||
|
|
||||||
ret = render('opensearch.xml',
|
ret = render('opensearch.xml',
|
||||||
method=method,
|
method=method,
|
||||||
host=get_base_url(),
|
host=get_base_url())
|
||||||
client=settings['client'])
|
|
||||||
|
|
||||||
resp = Response(response=ret,
|
resp = Response(response=ret,
|
||||||
status=200,
|
status=200,
|
||||||
|
|
Loading…
Reference in a new issue