fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix
[wolnelektury.git]
/
src
/
catalogue
/
models
/
collection.py
diff --git
a/src/catalogue/models/collection.py
b/src/catalogue/models/collection.py
index
412a976
..
f1a582c
100644
(file)
--- a/
src/catalogue/models/collection.py
+++ b/
src/catalogue/models/collection.py
@@
-56,6
+56,9
@@
class Collection(models.Model):
from catalogue.models import Book
return Book.objects.filter(self.get_query())
from catalogue.models import Book
return Book.objects.filter(self.get_query())
+ def get_5_books(self):
+ return self.get_books()[:5]
+
@cached_render('catalogue/collection_box.html')
def box(self):
return {
@cached_render('catalogue/collection_box.html')
def box(self):
return {