[enh] ordering categories

This commit is contained in:
asciimoo 2013-10-19 20:45:48 +02:00
parent 9ea84b285b
commit 726a4e4dca

View file

@ -45,7 +45,7 @@ opensearch_xml = '''<?xml version="1.0" encoding="utf-8"?>
def render(template_name, **kwargs): def render(template_name, **kwargs):
global categories global categories
kwargs['categories'] = categories.keys() kwargs['categories'] = sorted(categories.keys())
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(',')