--- a/src/p4l/models/data.py Fri Sep 20 15:44:11 2013 +0200
+++ b/src/p4l/models/data.py Fri Sep 20 22:21:48 2013 +0200
@@ -171,6 +171,12 @@
modification_date = models.DateTimeField(auto_now=True, serialize=False)
modified_by = models.ForeignKey(User, blank=True, null=True)
+ def get_titles(self):
+ return [t.title for t in self.titles.all()]
+
+ def get_authors(self):
+ return [a.name for a in self.authors.all()]
+
def get_imprints_years(self):
return sorted(set([i.imprintDate for i in self.imprints.all() if i.imprintDate]))