dynamicweb/ungleich_page/cms_plugins.py

28 lines
757 B
Python
Raw Normal View History

2017-10-17 13:52:30 +00:00
from cms.models.pluginmodel import CMSPlugin
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
2017-10-17 13:52:30 +00:00
from .models import UngelichPicture
@plugin_pool.register_plugin
class SectionWithImagePlugin(CMSPluginBase):
2017-10-17 13:52:30 +00:00
model = UngelichPicture
render_template = "ungleich_page/glasfaser/section_with_image.html"
cache = False
2017-10-17 13:52:30 +00:00
def render(self, context, instance, placeholder):
context.update({
'image': instance.image,
'object': instance,
'placeholder': placeholder
})
return context
@plugin_pool.register_plugin
class SectionContact(CMSPluginBase):
model = CMSPlugin
render_template = "ungleich_page/glasfaser/section_contact.html"
cache = False