fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added epub download desc
[wolnelektury.git]
/
apps
/
catalogue
/
views.py
diff --git
a/apps/catalogue/views.py
b/apps/catalogue/views.py
index
556bae1
..
d9ae442
100644
(file)
--- a/
apps/catalogue/views.py
+++ b/
apps/catalogue/views.py
@@
-81,8
+81,13
@@
def book_list(request):
orphans = []
books_by_author = SortedDict()
orphans = []
books_by_author = SortedDict()
+ books_nav = SortedDict()
for tag in models.Tag.objects.filter(category='author'):
books_by_author[tag] = []
for tag in models.Tag.objects.filter(category='author'):
books_by_author[tag] = []
+ if books_nav.has_key(tag.sort_key[0]):
+ books_nav[tag.sort_key[0]].append(tag)
+ else:
+ books_nav[tag.sort_key[0]] = [tag]
for book in books_by_parent[None]:
authors = list(book.tags.filter(category='author'))
for book in books_by_parent[None]:
authors = list(book.tags.filter(category='author'))