src/pyams_content/component/paragraph/video.py
changeset 355 5dce53509832
parent 241 50452584f7ae
child 407 0ef5de2d5674
equal deleted inserted replaced
354:871c7cb35fd6 355:5dce53509832
    23 from pyams_content.features.checker.interfaces import IContentChecker, MISSING_VALUE, MISSING_LANG_VALUE
    23 from pyams_content.features.checker.interfaces import IContentChecker, MISSING_VALUE, MISSING_LANG_VALUE
    24 from pyams_i18n.interfaces import II18nManager, INegotiator, II18n
    24 from pyams_i18n.interfaces import II18nManager, INegotiator, II18n
    25 from zope.lifecycleevent.interfaces import IObjectAddedEvent, IObjectModifiedEvent
    25 from zope.lifecycleevent.interfaces import IObjectAddedEvent, IObjectModifiedEvent
    26 
    26 
    27 # import packages
    27 # import packages
    28 from pyams_content.component.paragraph import BaseParagraph, BaseParagraphContentChecker
    28 from pyams_content.component.paragraph import BaseParagraph, BaseParagraphContentChecker, BaseParagraphFactory
    29 from pyams_content.component.paragraph.html import check_associations
    29 from pyams_content.component.paragraph.html import check_associations
    30 from pyams_file.property import FileProperty
    30 from pyams_file.property import FileProperty
    31 from pyams_utils.adapter import adapter_config
    31 from pyams_utils.adapter import adapter_config
    32 from pyams_utils.registry import utility_config, get_utility
    32 from pyams_utils.registry import utility_config, get_utility
    33 from pyams_utils.traversing import get_parent
    33 from pyams_utils.traversing import get_parent
    50     author = FieldProperty(IVideoParagraph['author'])
    50     author = FieldProperty(IVideoParagraph['author'])
    51     data = FileProperty(IVideoParagraph['data'])
    51     data = FileProperty(IVideoParagraph['data'])
    52 
    52 
    53 
    53 
    54 @utility_config(name='Video', provides=IParagraphFactory)
    54 @utility_config(name='Video', provides=IParagraphFactory)
    55 class VideoParagraphFactory(object):
    55 class VideoParagraphFactory(BaseParagraphFactory):
    56     """Video paragraph factory"""
    56     """Video paragraph factory"""
    57 
    57 
    58     name = _("Video")
    58     name = _("Video")
    59     content_type = VideoParagraph
    59     content_type = VideoParagraph
    60 
    60