Merge pull request #662 from wking/rich-urlwrapper-comparisons

contents: Add rich comparisons to URLWrapper for easy sorting
This commit is contained in:
Bruno Binet 2013-01-21 13:30:02 -08:00
commit d9855ae346
4 changed files with 64 additions and 5 deletions

View file

@ -416,11 +416,10 @@ class ArticlesGenerator(Generator):
# order the categories per name
self.categories = list(self.categories.items())
self.categories.sort(
key=lambda item: item[0].name,
reverse=self.settings['REVERSE_CATEGORY_ORDER'])
self.authors = list(self.authors.items())
self.authors.sort(key=lambda item: item[0].name)
self.authors.sort()
self._update_context(('articles', 'dates', 'tags', 'categories',
'tag_cloud', 'authors', 'related_posts'))