我需要将 2 个函数 save() 添加到一个模型。怎么做?
def save(self, *args, **kwargs):
self.slug = slugify(self.title)
super(Property, self).save(*args, **kwargs)
def save(self, *args, **kwargs):
self.key = ''.join(random.choice(string.letters) for i in xrange(132))
..........
return self