summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
authorrenyhp <renyhp@disroot.org>2020-11-22 18:00:21 +0100
committerrenyhp <renyhp@disroot.org>2020-11-22 18:16:43 +0100
commitb00f77059c93bc91f706b5f0c51f7db752669b09 (patch)
tree06fbc91fdd4ef0e1fd23ce1286815c45b5c0a16c /searx/webapp.py
parent2fc3b17c85512280173bb47f449cc2faa64b0501 (diff)
downloadsearxng-b00f77059c93bc91f706b5f0c51f7db752669b09.tar.gz
searxng-b00f77059c93bc91f706b5f0c51f7db752669b09.zip
Add preference for displaying advanced settings
Diffstat (limited to 'searx/webapp.py')
-rwxr-xr-xsearx/webapp.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index 2a93c3765..c0530a834 100755
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -545,6 +545,9 @@ def index_error(output_format, error_message):
def index():
"""Render index page."""
+ # UI
+ advanced_search = request.form.get('advanced_search', request.preferences.get_value('advanced_search'))
+
# redirect to search if there's a query in the request
if request.form.get('q'):
query = ('?' + request.query_string.decode()) if request.query_string else ''
@@ -553,6 +556,7 @@ def index():
return render(
'index.html',
selected_categories=get_selected_categories(request.preferences, request.form),
+ advanced_search=advanced_search,
)