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)
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)
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)