fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
combined
(merge:
5074895
a04dc48
)
Merge branch 'api'
author
Jan Szejko
<janek37@gmail.com>
Thu, 14 Dec 2017 08:43:33 +0000
(09:43 +0100)
committer
Jan Szejko
<janek37@gmail.com>
Thu, 14 Dec 2017 08:43:33 +0000
(09:43 +0100)
1
2
src/catalogue/models/book.py
patch
|
diff1
|
diff2
|
blob
|
history
diff --cc
src/catalogue/models/book.py
index
02278de
,
00921b8
..
140ba50
---
1
/
src/catalogue/models/book.py
---
2
/
src/catalogue/models/book.py
+++ b/
src/catalogue/models/book.py
@@@
-119,11
-122,8
+122,11
@@@
class Book(models.Model)
else:
return ', '.join(self.tags.filter(category=category).values_list('name', flat=True))
+ def tags_by_category(self):
+ return split_tags(self.tags.exclude(category__in=('set', 'theme')))
+
def author_unicode(self):
- return self.
tag_unicode('author')
+ return self.
cached_author
def translator(self):
translators = self.extra_info.get('translators')