I redefined the save () method in the model, and now when I change the record in the admin panel, the error "UNIQUE constraint failed: rec.id" falls out.

def save(self, *args, **kwargs): self.slug = slugify(self.title) super(Post, self).save(self, *args, **kwargs) 

Swears on the last line, how can this be fixed?

    1 answer 1

    Are you in the last line with the number of self not messed up?
    It seems like this:

     super(Post, self).save(*args, **kwargs)