mirror of
https://github.com/searxng/searxng.git
synced 2025-08-02 18:12:21 +02:00
[enh] default settings option to safe_search - #396
This commit is contained in:
parent
c1d9cfd9ae
commit
43cd8e0c41
2 changed files with 5 additions and 4 deletions
|
@ -312,7 +312,7 @@ def render(template_name, override_theme=None, **kwargs):
|
|||
|
||||
kwargs['method'] = request.cookies.get('method', 'POST')
|
||||
|
||||
kwargs['safesearch'] = request.cookies.get('safesearch', '1')
|
||||
kwargs['safesearch'] = request.cookies.get('safesearch', str(settings['search']['safe_search']))
|
||||
|
||||
# override url_for function in templates
|
||||
kwargs['url_for'] = url_for_theme
|
||||
|
@ -542,7 +542,7 @@ def preferences():
|
|||
locale = None
|
||||
autocomplete = ''
|
||||
method = 'POST'
|
||||
safesearch = '1'
|
||||
safesearch = settings['search']['safe_search']
|
||||
for pd_name, pd in request.form.items():
|
||||
if pd_name.startswith('category_'):
|
||||
category = pd_name[9:]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue