Update docs
This commit is contained in:
parent
3677129423
commit
6c7e1b72f8
3 changed files with 20 additions and 0 deletions
|
@ -3,6 +3,11 @@
|
|||
History
|
||||
-------
|
||||
|
||||
0.7.1 (unreleased)
|
||||
++++++++++++++++++
|
||||
|
||||
* Add django-knocker integration
|
||||
|
||||
0.7.0 (2016-03-19)
|
||||
++++++++++++++++++
|
||||
|
||||
|
|
|
@ -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 <https://github.com/nephila/django-knocker>`_
|
||||
to provide real time desktop notifications.
|
||||
|
||||
See `django-knocker documentation <https://django-knocker.readthedocs.org/>`_ for how to configure
|
||||
knocker.
|
||||
|
||||
.. _settings:
|
||||
|
||||
Global Settings
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue