mirror of
https://github.com/searxng/searxng.git
synced 2024-12-23 17:50:29 +00:00
[enh][mod] search category order
This commit is contained in:
parent
8b3ca1112c
commit
1db082a287
1 changed files with 2 additions and 1 deletions
|
@ -70,7 +70,8 @@ def get_base_url():
|
||||||
|
|
||||||
def render(template_name, **kwargs):
|
def render(template_name, **kwargs):
|
||||||
global categories
|
global categories
|
||||||
kwargs['categories'] = sorted(categories.keys())
|
kwargs['categories'] = ['general']
|
||||||
|
kwargs['categories'].extend(x for x in sorted(categories.keys()) if x != 'general')
|
||||||
if not 'selected_categories' in kwargs:
|
if not 'selected_categories' in kwargs:
|
||||||
kwargs['selected_categories'] = []
|
kwargs['selected_categories'] = []
|
||||||
cookie_categories = request.cookies.get('categories', '').split(',')
|
cookie_categories = request.cookies.get('categories', '').split(',')
|
||||||
|
|
Loading…
Reference in a new issue