src/pyams_content/shared/blog/__init__.py
changeset 42 bcb01961928e
child 139 99a481dc4c89
equal deleted inserted replaced
41:48aa4de90de2 42:bcb01961928e
       
     1 #
       
     2 # Copyright (c) 2008-2016 Thierry Florac <tflorac AT ulthar.net>
       
     3 # All Rights Reserved.
       
     4 #
       
     5 # This software is subject to the provisions of the Zope Public License,
       
     6 # Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
       
     7 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
       
     8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
       
     9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
       
    10 # FOR A PARTICULAR PURPOSE.
       
    11 #
       
    12 
       
    13 __docformat__ = 'restructuredtext'
       
    14 
       
    15 
       
    16 # import standard library
       
    17 
       
    18 # import interfaces
       
    19 from pyams_content.component.extfile.interfaces import IExtFileContainerTarget
       
    20 from pyams_content.component.gallery.interfaces import IGalleryContainerTarget
       
    21 from pyams_content.component.links.interfaces import ILinkContainerTarget
       
    22 from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget
       
    23 from pyams_content.component.theme.interfaces import IThemesTarget
       
    24 from pyams_content.shared.blog.interfaces import IWfBlogPost, BLOG_CONTENT_TYPE, BLOG_CONTENT_NAME, IBlogPost
       
    25 
       
    26 # import packages
       
    27 from pyams_content.shared.common import WfSharedContent, register_content_type, SharedContent
       
    28 from zope.interface import implementer
       
    29 
       
    30 
       
    31 @implementer(IWfBlogPost, IParagraphContainerTarget, IThemesTarget, IExtFileContainerTarget, ILinkContainerTarget,
       
    32              IGalleryContainerTarget)
       
    33 class WfBlogPost(WfSharedContent):
       
    34     """Base blog post"""
       
    35 
       
    36     content_type = BLOG_CONTENT_TYPE
       
    37     content_name = BLOG_CONTENT_NAME
       
    38 
       
    39 register_content_type(WfBlogPost)
       
    40 
       
    41 
       
    42 @implementer(IBlogPost)
       
    43 class BlogPost(SharedContent):
       
    44     """Worfklow managed blog post class"""
       
    45 
       
    46     content_class = WfBlogPost