removed sort in HTML and instead added conditional to use subcategory titles as sort_key

This commit is contained in:
Giulio Gratta
2013-08-16 17:24:36 -07:00
parent 8cac4ebae2
commit e0471007d8
2 changed files with 2 additions and 1 deletions

View File

@@ -129,6 +129,8 @@ def filter_unstarted_categories(category_map):
def sort_map_entries(category_map):
things = []
for title, entry in category_map["entries"].items():
if entry["sort_key"] == None:
entry["sort_key"] = title
things.append((title, entry))
for title, category in category_map["subcategories"].items():
things.append((title, category))

View File

@@ -2,7 +2,6 @@
<%! import json %>
<%def name="render_dropdown(map)">
${map["children"].sort()}
% for child in map["children"]:
% if child in map["entries"]:
${render_entry(map["entries"], child)}