+ def authors(self):
+ return self.tags.filter(category='author')
+
+ def tag_unicode(self, category):
+ relations = prefetched_relations(self, category)
+ if relations:
+ return ', '.join(rel.tag.name for rel in relations)
+ 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.cached_author
+
+ def translator(self):
+ translators = self.extra_info.get('translators')
+ if not translators:
+ return None
+ if len(translators) > 3:
+ translators = translators[:2]
+ others = ' i inni'
+ else:
+ others = ''
+ return ', '.join(u'\xa0'.join(reversed(translator.split(', ', 1))) for translator in translators) + others
+
+ def cover_source(self):
+ return self.extra_info.get('cover_source', self.parent.cover_source() if self.parent else '')