src/pyams_content/component/paragraph/zmi/html.py
changeset 395 2a39b333a585
parent 355 5dce53509832
child 396 a6c3d1974420
equal deleted inserted replaced
394:1ebcb03e9bff 395:2a39b333a585
    16 # import standard library
    16 # import standard library
    17 
    17 
    18 # import interfaces
    18 # import interfaces
    19 from pyams_content.component.association.interfaces import IAssociationTarget
    19 from pyams_content.component.association.interfaces import IAssociationTarget
    20 from pyams_content.component.association.zmi.interfaces import IAssociationsParentForm
    20 from pyams_content.component.association.zmi.interfaces import IAssociationsParentForm
    21 from pyams_content.component.illustration.interfaces import IIllustration, IIllustrationRenderer
    21 from pyams_content.component.illustration.interfaces import IIllustration
    22 from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
    22 from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget, IParagraphContainer, \
    23     IParagraphSummary
    23     IParagraphSummary
    24 from pyams_content.component.paragraph.interfaces.html import IHTMLParagraph, IRawParagraph
    24 from pyams_content.component.paragraph.interfaces.html import IHTMLParagraph, IRawParagraph
    25 from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor, IParagraphContainerView
    25 from pyams_content.component.paragraph.zmi.interfaces import IParagraphInnerEditor, IParagraphContainerView
    26 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
    26 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
   352             for attr in ('title', 'body'):
   352             for attr in ('title', 'body'):
   353                 setattr(self, attr, i18n.query_attribute(attr, request=self.request))
   353                 setattr(self, attr, i18n.query_attribute(attr, request=self.request))
   354         self.illustration = IIllustration(self.context)
   354         self.illustration = IIllustration(self.context)
   355         if self.illustration.data:
   355         if self.illustration.data:
   356             registry = get_current_registry()
   356             registry = get_current_registry()
   357             renderer = self.illustration_renderer = registry.queryMultiAdapter((self.illustration, self.request),
   357             renderer = self.illustration_renderer = self.illustration.get_renderer()
   358                                                                                IIllustrationRenderer,
       
   359                                                                                name=self.illustration.renderer)
       
   360             if renderer is not None:
   358             if renderer is not None:
   361                 renderer.update()
   359                 renderer.update()
   362 
   360 
   363     def render_illustration(self):
   361     def render_illustration(self):
   364         if not self.illustration_renderer:
   362         if not self.illustration_renderer: