fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
css fix
[wolnelektury.git]
/
src
/
catalogue
/
views.py
diff --git
a/src/catalogue/views.py
b/src/catalogue/views.py
index
904cdc5
..
38c6165
100644
(file)
--- a/
src/catalogue/views.py
+++ b/
src/catalogue/views.py
@@
-66,7
+66,10
@@
def daisy_list(request):
def collection(request, slug):
coll = get_object_or_404(Collection, slug=slug)
def collection(request, slug):
coll = get_object_or_404(Collection, slug=slug)
- return render(request, 'catalogue/collection.html', {'collection': coll})
+ return render(request, 'catalogue/collection.html', {
+ 'collection': coll,
+ 'active_menu_item': 'collections',
+ })
def differentiate_tags(request, tags, ambiguous_slugs):
def differentiate_tags(request, tags, ambiguous_slugs):
@@
-455,13
+458,14
@@
def collections(request):
objects = Collection.objects.filter(listed=True)
if len(objects) > 3:
objects = Collection.objects.filter(listed=True)
if len(objects) > 3:
- best = random.sample(list(objects),
3
)
+ best = random.sample(list(objects),
4
)
else:
best = objects
return render(request, 'catalogue/collections.html', {
'objects': objects,
'best': best,
else:
best = objects
return render(request, 'catalogue/collections.html', {
'objects': objects,
'best': best,
+ 'active_menu_item': 'collections'
})
})