Example #1
0
 def dcattr_add(self, name, value, comment=""):
     a = dcattr(
         self,
         name=name,
         value=value,
         comment=comment,
     )
     a.save()
     self.append_dcattr(a)
Example #2
0
 def _load_dcattrs(self):
     # as soon as we have a dcdocid we also have workdir()
     if not os.path.exists(self.workdir()): return
     for dcattr_file in os.listdir(self.workdir()):
         if re.match('.*\.dcattr$', dcattr_file):
             self.append_dcattr(dcattr(self, dcattrfilename=dcattr_file))