I am trying to create an automatic pool for a model whenever it is empty, from another field. This is the code:
class Position(RichText): name = models.CharField(max_length=200) slug = models.SlugField(null=True) def position_description(self): return self.content def __unicode__(self): return self.name def save(self, *args, **kwargs): if not self.slug: self.slug = slugify(self.name) super(Position, self).save(*args, **kwargs)
When I load the starters with loaddata, it seems that the save() method never starts. Is this normal behavior? How can I catch fixtures too?
source share