dynamicweb/ungleich_page/models.py
M.Ravi f6468a7c8c First attempt to services section
- base.py: add settings to load GlasfaserServicesPlugin by default
    - glasfaser_cms_page.html: create a placeholder for services
    - cms_plugins.py: add the plugin code
    - models.py: add UngelichTextSectionWithImage model
2017-10-18 09:10:50 +02:00

32 lines
No EOL
801 B
Python

from cms.models.pluginmodel import CMSPlugin
from django.db import models
from djangocms_text_ckeditor.fields import HTMLField
from filer.fields.image import FilerImageField
class UngelichPicture(CMSPlugin):
image = FilerImageField(
null=True,
blank=True,
related_name="image",
on_delete=models.SET_NULL
)
title = models.CharField(max_length=200)
class UngelichContactUsSection(CMSPlugin):
email = models.EmailField(max_length=200)
class UngelichTextSection(CMSPlugin):
title = models.CharField(max_length=200)
description = HTMLField()
class UngelichTextSectionWithImage(UngelichTextSection):
image = FilerImageField(
null=True,
blank=True,
related_name="utswi_image",
on_delete=models.SET_NULL
)