diff --git a/djangocms_blog/models.py b/djangocms_blog/models.py index 3989bf48..4ca525ab 100644 --- a/djangocms_blog/models.py +++ b/djangocms_blog/models.py @@ -197,11 +197,17 @@ def __str__(self): return self.safe_translation_getter('title') def save(self, *args, **kwargs): + """ + Handle some auto configuration during save + """ if self.publish and self.date_published is None: self.date_published = timezone.now() super(Post, self).save(*args, **kwargs) def save_translation(self, translation, *args, **kwargs): + """ + Handle some auto configuration during save + """ if not translation.slug and translation.title: translation.slug = slugify(translation.title) super(Post, self).save_translation(translation, *args, **kwargs)