fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'minimal-double-reader' into rwd
[wolnelektury.git]
/
apps
/
catalogue
/
models
/
book.py
diff --git
a/apps/catalogue/models/book.py
b/apps/catalogue/models/book.py
index
c865d1d
..
3cab676
100644
(file)
--- a/
apps/catalogue/models/book.py
+++ b/
apps/catalogue/models/book.py
@@
-391,6
+391,10
@@
class Book(models.Model):
for child in self.children.all():
child.parent_cover_changed()
for child in self.children.all():
child.parent_cover_changed()
+ def other_versions(self):
+ """Find other versions (i.e. in other languages) of the book."""
+ return type(self).objects.filter(common_slug=self.common_slug).exclude(pk=self.pk)
+
def related_info(self):
"""Keeps info about related objects (tags, media) in cache field."""
if self._related_info is not None:
def related_info(self):
"""Keeps info about related objects (tags, media) in cache field."""
if self._related_info is not None: