Exemplo n.º 1
0
 def test_slugify(self):
     """
     Test that the slugify utiltity works.
     """
     from ourdata.apps.common.utils import slugify
     title = u'This should be slugif":ed yall/'
     self.assertEqual(slugify(title), u'this-should-be-slugifed-yall')
Exemplo n.º 2
0
 def save(self, *args, **kwargs):
     """
     Populate a slug field on save.
     """
     self.slug = slugify(self.title)
     super(DatasetSchema, self).save(*args, **kwargs)