From 6c7e1b72f818e10cd4ab38c591bf3362b442b994 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sat, 26 Mar 2016 01:25:40 +0100 Subject: [PATCH] Update docs --- HISTORY.rst | 5 +++++ README.rst | 9 +++++++++ djangocms_blog/models.py | 6 ++++++ 3 files changed, 20 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index 4611579..98dcaad 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,11 @@ History ------- +0.7.1 (unreleased) +++++++++++++++++++ + +* Add django-knocker integration + 0.7.0 (2016-03-19) ++++++++++++++++++ diff --git a/README.rst b/README.rst index 63957ad..38671f3 100644 --- a/README.rst +++ b/README.rst @@ -357,6 +357,15 @@ hae been reported; to handle these cases gracefully, the exception is swallowed when Django ``DEBUG == True`` avoiding breaking production websites. In these cases they wizard may not show up, but the rest will work as intended. +django-knocker +++++++++++++++ + +``djangocms-blog`` is integrated with `django-knocker `_ +to provide real time desktop notifications. + +See `django-knocker documentation `_ for how to configure +knocker. + .. _settings: Global Settings diff --git a/djangocms_blog/models.py b/djangocms_blog/models.py index 4e9b332..9d4503c 100644 --- a/djangocms_blog/models.py +++ b/djangocms_blog/models.py @@ -37,6 +37,9 @@ try: from knocker.mixins import KnockerModel except ImportError: class KnockerModel(object): + """ + Stub class if django-knocker is not installed + """ pass @@ -293,6 +296,9 @@ class Post(KnockerModel, ModelMeta, TranslatableModel): @property def is_published(self): + """ + Checks wether the blog post is *really* published by checking publishing dates too + """ return (self.publish and (self.date_published and self.date_published <= timezone.now()) and (self.date_published_end is None or self.date_published_end > timezone.now())