def save(self, **kwargs): if self.slug is None: self.slug = slugify(self.name) super(Project, self).save(**kwargs)
def test_slugify(self): self.assertEqual(slugify("Mississippi Election Results"), "mississippi-election-results")