fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4d63ddd
)
bugfix: list all objects, not just those with description
author
Jan Szejko
<j-sz@o2.pl>
Tue, 26 Jan 2016 15:27:50 +0000
(16:27 +0100)
committer
Jan Szejko
<j-sz@o2.pl>
Tue, 26 Jan 2016 15:27:50 +0000
(16:27 +0100)
src/catalogue/views.py
patch
|
blob
|
history
diff --git
a/src/catalogue/views.py
b/src/catalogue/views.py
index
847831d
..
297339e
100644
(file)
--- a/
src/catalogue/views.py
+++ b/
src/catalogue/views.py
@@
-712,12
+712,12
@@
def tag_catalogue(request, category):
else:
tags = list(get_top_level_related_tags((), categories=(category,)))
else:
tags = list(get_top_level_related_tags((), categories=(category,)))
- tags = [tag for tag in tags if tag.description]
+
described_
tags = [tag for tag in tags if tag.description]
- if len(tags) > 4:
- best = random.sample(tags, 4)
+ if len(
described_
tags) > 4:
+ best = random.sample(
described_
tags, 4)
else:
else:
- best = tags
+ best =
described_
tags
return render(request, 'catalogue/tag_catalogue.html', {
'tags': tags,
return render(request, 'catalogue/tag_catalogue.html', {
'tags': tags,