Newer
Older
from cubicweb.selectors import implements, is_in_state
Sylvain Thénault
committed
from cubicweb.sobjects.notification import NotificationView, StatusChangeMixIn
Sylvain Thénault
committed
class BlogEntryPublishedView(StatusChangeMixIn, NotificationView):
"""get notified from published blogs"""
__select__ = implements('BlogEntry',) & is_in_state('published')
def subject(self):
entity = self.cw_rset.get_entity(0, 0)
return '[%s] %s' % (self._cw.vreg.config.appid, entity.dc_title())