From fa340fe1a96e8415a5bebadf476cdfa77ca3bd17 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Fri, 8 Apr 2016 19:19:02 +0200 Subject: [PATCH] Add docstring --- djangocms_blog/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/djangocms_blog/models.py b/djangocms_blog/models.py index 3989bf4..4ca525a 100644 --- a/djangocms_blog/models.py +++ b/djangocms_blog/models.py @@ -197,11 +197,17 @@ class Post(KnockerModel, ModelMeta, TranslatableModel): 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)