src/p4l/models/data.py
changeset 114 93b45b4f423c
parent 113 c05567404888
child 126 a345f1a67bf1
equal deleted inserted replaced
113:c05567404888 114:93b45b4f423c
   175         return [t.title for t in self.titles.all()]
   175         return [t.title for t in self.titles.all()]
   176     
   176     
   177     def get_authors(self):
   177     def get_authors(self):
   178         return [a.name for a in self.authors.all()]
   178         return [a.name for a in self.authors.all()]
   179     
   179     
       
   180     def get_corporate_authors(self):
       
   181         return [c.uri for c in self.corporateAuthors.all()]
       
   182     
   180     def get_imprints_years(self):
   183     def get_imprints_years(self):
   181         return sorted(set([i.imprintDate for i in self.imprints.all() if i.imprintDate]))
   184         return sorted(set([i.imprintDate for i in self.imprints.all() if i.imprintDate]))
   182 
   185 
   183     def __unicode__(self):
   186     def __unicode__(self):
   184         return "Record id %s { identifier: %s, uri: %s, editionStatement: %s,  recordType: %s, isDocumentPart: %s, notes: %s, language : %s}" \
   187         return "Record id %s { identifier: %s, uri: %s, editionStatement: %s,  recordType: %s, isDocumentPart: %s, notes: %s, language : %s}" \