Exemple #1
0
 def clean(self):
     if not self.slug:
         self.slug = slugify(self.title)
Exemple #2
0
 def __init__(self, *args, **kwargs):
     if 'name' in kwargs and 'slug' not in kwargs:
         kwargs['slug'] = slugify(kwargs['name'])
     super(Series, self).__init__(*args, **kwargs)