fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
switch to fnp-django-pagination
[wolnelektury.git]
/
src
/
catalogue
/
models
/
book.py
diff --git
a/src/catalogue/models/book.py
b/src/catalogue/models/book.py
index
5ac999e
..
c537e5d
100644
(file)
--- a/
src/catalogue/models/book.py
+++ b/
src/catalogue/models/book.py
@@
-386,6
+386,7
@@
class Book(models.Model):
for child in notify_cover_changed:
child.parent_cover_changed()
for child in notify_cover_changed:
child.parent_cover_changed()
+ book.save() # update sort_key_author
cls.published.send(sender=cls, instance=book)
return book
cls.published.send(sender=cls, instance=book)
return book
@@
-499,6
+500,13
@@
class Book(models.Model):
names = [tag[0] for tag in names]
return ', '.join(names)
names = [tag[0] for tag in names]
return ', '.join(names)
+ def publisher(self):
+ publisher = self.extra_info['publisher']
+ if isinstance(publisher, basestring):
+ return publisher
+ elif isinstance(publisher, list):
+ return ', '.join(publisher)
+
@classmethod
def tagged_top_level(cls, tags):
""" Returns top-level books tagged with `tags`.
@classmethod
def tagged_top_level(cls, tags):
""" Returns top-level books tagged with `tags`.