From ef47e999f1c5da26046c2c882f320733590de23d Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Tue, 17 Oct 2017 16:25:01 +0200 Subject: [PATCH] Create SectionContact CMSPlugin --- ungleich_page/cms_plugins.py | 5 ++--- ungleich_page/models.py | 4 ++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ungleich_page/cms_plugins.py b/ungleich_page/cms_plugins.py index 8f2b1883..30444d9f 100644 --- a/ungleich_page/cms_plugins.py +++ b/ungleich_page/cms_plugins.py @@ -1,8 +1,7 @@ -from cms.models.pluginmodel import CMSPlugin from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool -from .models import UngelichPicture +from .models import UngelichPicture, UngelichContactUsSection @plugin_pool.register_plugin @@ -22,6 +21,6 @@ class SectionWithImagePlugin(CMSPluginBase): @plugin_pool.register_plugin class SectionContact(CMSPluginBase): - model = CMSPlugin + model = UngelichContactUsSection render_template = "ungleich_page/glasfaser/section_contact.html" cache = False diff --git a/ungleich_page/models.py b/ungleich_page/models.py index 4199e6f7..3762a1aa 100644 --- a/ungleich_page/models.py +++ b/ungleich_page/models.py @@ -11,3 +11,7 @@ class UngelichPicture(CMSPlugin): on_delete=models.SET_NULL ) title = models.CharField(max_length=200) + + +class UngelichContactUsSection(CMSPlugin): + email = models.EmailField(max_length=200)