Updated gallery renderer context interface
authorThierry Florac <thierry.florac@onf.fr>
Mon, 24 Sep 2018 16:03:04 +0200
changeset 151 c555624ebbbd
parent 150 74668803337f
child 152 7bd4cb30b503
Updated gallery renderer context interface
src/pyams_default_theme/component/gallery/__init__.py
--- a/src/pyams_default_theme/component/gallery/__init__.py	Fri Sep 21 10:40:53 2018 +0200
+++ b/src/pyams_default_theme/component/gallery/__init__.py	Mon Sep 24 16:03:04 2018 +0200
@@ -13,26 +13,20 @@
 __docformat__ = 'restructuredtext'
 
 
-# import standard library
-
-# import interfaces
-from pyams_content.component.gallery import IGallery
+from pyams_content.component.gallery.interfaces import IBaseGallery
 from pyams_content.features.renderer.interfaces import IContentRenderer
+from pyams_content.features.renderer.skin import BaseContentRenderer
+from pyams_default_theme import _
 from pyams_skin.layer import IPyAMSLayer
-
-# import packages
-from pyams_content.features.renderer.skin import BaseContentRenderer
 from pyams_template.template import template_config
 from pyams_utils.adapter import adapter_config
 
-from pyams_default_theme import _
-
 
 class BaseGalleryRenderer(BaseContentRenderer):
     """Base gallery renderer"""
 
 
-@adapter_config(name='default', context=(IGallery, IPyAMSLayer), provides=IContentRenderer)
+@adapter_config(name='default', context=(IBaseGallery, IPyAMSLayer), provides=IContentRenderer)
 @template_config(template='templates/renderer-default.pt', layer=IPyAMSLayer)
 class DefaultGalleryRenderer(BaseGalleryRenderer):
     """Default gallery renderer"""