+ 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 author_unicode(self):
+ return self.tag_unicode('author')
+
+ def tags_by_category(self):
+ return split_tags(self.tags)