2020-01-05 02:36:23 +00:00
|
|
|
from django.db import models
|
|
|
|
from django.conf import settings
|
2020-01-02 18:32:15 +00:00
|
|
|
from cms.models import BasePage, BaseSection
|
|
|
|
from cms.decorators import register_model
|
2020-01-02 00:56:15 +00:00
|
|
|
|
|
|
|
class Page(BasePage):
|
|
|
|
'''Add custom fields here. Already existing fields: position, title,
|
|
|
|
slug, menu
|
|
|
|
|
|
|
|
'''
|
2019-12-31 12:05:12 +00:00
|
|
|
|
|
|
|
class Section(BaseSection):
|
2020-01-02 00:56:15 +00:00
|
|
|
'''Add custom fields here. Already existing fields: type, position,
|
2020-01-05 02:36:23 +00:00
|
|
|
title, content, image, video, button_text, button_link
|
2019-12-31 12:05:12 +00:00
|
|
|
|
|
|
|
'''
|
|
|
|
|
2020-01-02 18:32:15 +00:00
|
|
|
@register_model('Tekst')
|
2019-12-31 12:05:12 +00:00
|
|
|
class TextSection(Section):
|
2020-01-05 12:37:51 +00:00
|
|
|
fields = ['title', 'content']
|
2020-01-05 02:36:23 +00:00
|
|
|
class Meta:
|
|
|
|
proxy = True
|
|
|
|
|
|
|
|
@register_model('Button')
|
|
|
|
class ButtonSection(Section):
|
2020-02-19 15:35:23 +00:00
|
|
|
fields = ['title', 'href']
|
2019-12-31 12:05:12 +00:00
|
|
|
class Meta:
|
|
|
|
proxy = True
|
|
|
|
|
2020-01-02 18:32:15 +00:00
|
|
|
@register_model('Afbeelding')
|
2019-12-31 12:05:12 +00:00
|
|
|
class ImageSection(Section):
|
2020-01-05 12:37:51 +00:00
|
|
|
fields = ['title', 'image']
|
2019-12-31 12:05:12 +00:00
|
|
|
class Meta:
|
|
|
|
proxy = True
|
2020-01-02 18:32:15 +00:00
|
|
|
|
2020-01-05 02:36:23 +00:00
|
|
|
@register_model('Video')
|
|
|
|
class VideoSection(Section):
|
2020-01-05 12:37:51 +00:00
|
|
|
fields = ['title', 'video']
|
2020-01-05 02:36:23 +00:00
|
|
|
class Meta:
|
|
|
|
proxy = True
|
|
|
|
|
2020-01-02 18:32:15 +00:00
|
|
|
@register_model('Contact')
|
|
|
|
class ContactSection(Section):
|
2020-01-05 12:37:51 +00:00
|
|
|
fields = ['title']
|
2020-01-02 18:32:15 +00:00
|
|
|
class Meta:
|
|
|
|
proxy = True
|