def delete(self): if self.deleted_uuid: raise self.RedeletedError, self.pk self.deleted_uuid = generate_uuid() self.deleted_at = datetime.now() self.save()
def delete(self): return self.update(deleted_uuid=generate_uuid(), deleted_at=datetime.now())