2017-10-17 07:30:52 +00:00
|
|
|
from cms.plugin_base import CMSPluginBase
|
|
|
|
from cms.plugin_pool import plugin_pool
|
2017-10-17 13:52:30 +00:00
|
|
|
|
2017-10-17 15:47:40 +00:00
|
|
|
from .models import (
|
|
|
|
UngelichPicture, UngelichContactUsSection, UngelichTextSection
|
|
|
|
)
|
2017-10-17 07:30:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
@plugin_pool.register_plugin
|
|
|
|
class SectionWithImagePlugin(CMSPluginBase):
|
2017-10-17 13:52:30 +00:00
|
|
|
model = UngelichPicture
|
2017-10-17 07:30:52 +00:00
|
|
|
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
|
|
|
|
|
2017-10-17 07:30:52 +00:00
|
|
|
|
|
|
|
@plugin_pool.register_plugin
|
|
|
|
class SectionContact(CMSPluginBase):
|
2017-10-17 14:25:01 +00:00
|
|
|
model = UngelichContactUsSection
|
2017-10-17 07:30:52 +00:00
|
|
|
render_template = "ungleich_page/glasfaser/section_contact.html"
|
|
|
|
cache = False
|
2017-10-17 15:47:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
@plugin_pool.register_plugin
|
|
|
|
class SectionTextParagraphDCL(CMSPluginBase):
|
|
|
|
model = UngelichTextSection
|
|
|
|
render_template = "ungleich_page/glasfaser/section_text_dcl.html"
|
|
|
|
cache = False
|
|
|
|
|
|
|
|
|
|
|
|
@plugin_pool.register_plugin
|
|
|
|
class SectionTextParagraphGlasfaser(CMSPluginBase):
|
|
|
|
model = UngelichTextSection
|
|
|
|
render_template = "ungleich_page/glasfaser/section_text_glasfaser.html"
|
|
|
|
cache = False
|