def save(self, *args, **kwargs): new_meal = True if not self.pk else False # name related operations if new_meal or hasattr(self, '_updated_name'): self.slug = custom_slugify(self.name) super(Meal, self).save(*args, **kwargs)
def save(self, *args, **kwargs): self.slug = custom_slugify(self.name, offset=30) super(Packet, self).save(*args, **kwargs)
def save(self, *args, **kwargs): self.slug = custom_slugify(self.name, offset=30) super(KnowledgeStore, self).save(*args, **kwargs)