src/p4l/models/data.py
changeset 80 c1e36f5911a9
parent 77 15b34232100d
child 93 c675183a9325
child 101 71532a54d1c4
--- a/src/p4l/models/data.py	Fri Sep 13 10:31:33 2013 +0200
+++ b/src/p4l/models/data.py	Fri Sep 13 10:36:03 2013 +0200
@@ -171,6 +171,9 @@
     
     isDocumentPart = models.BooleanField() #iiep:isDocumentPart
     isMultilingual = models.BooleanField() #iiep:isMultilingual
+    
+    def get_imprints_years(self):
+        return sorted(set([i.imprintDate for i in self.imprints.all() if i.imprintDate]))
 
     def __unicode__(self):
         return "Record id %s { identifier: %s, uri: %s, editionStatement: %s,  recordType: %s, isDocumentPart: %s, notes: %s, language : %s}" \