示例#1
0
 def save(self, *args, **kwargs):
     if not self.id:
         self.id = mintandbind(objtype='c', objurl=self.access_loc,
                               description=self.name)
     if not self.stats:
         self.stats = self.collect_stats()
     super(Collection, self).save(*args, **kwargs)
示例#2
0
 def save(self, *args, **kwargs):
     if not self.id:
         desc = 'local_id: %s; title: %s;' % (self.local_id, self.title)
         self.id = mintandbind(objtype='i', objurl=self.access_loc,
                               description=desc)
     if not self.stats:
         self.stats = self.collect_stats()
     super(Item, self).save(*args, **kwargs)
示例#3
0
 def save(self, *args, **kwargs):
     if not self.id:
         self.id = mintandbind(objtype='p', description=self.name)
     if not self.stats:
         self.stats = self.collect_stats()
     super(Project, self).save(*args, **kwargs)