Example #1
0
    def save(self, *args, **kwargs):
        if not self.slug:
            self.slug = slugify_uniquely(self.name, self.__class__)
        else:
            self.modified_date = timezone.now()

        super(Project, self).save(*args, **kwargs)
Example #2
0
 def save(self, *args, **kwargs):
     if not self.slug:
         self.slug = slugify_uniquely(self.subject, self.__class__)
     super(Question, self).save(*args, **kwargs)