Files
old-saburly-wagtail-web/about/models.py
2024-09-11 23:05:33 +02:00

35 lines
1.2 KiB
Python

from __future__ import unicode_literals
from django.db import models
from wagtail.models import Page
from wagtail.fields import RichTextField
from wagtail.admin.panels import FieldPanel, MultiFieldPanel
from saburly.custom_editor import FULL_EDITOR
class AboutPage(Page):
section_one_title = RichTextField(blank=True, features=FULL_EDITOR)
section_one_text = RichTextField(blank=True, features=FULL_EDITOR)
section_one_img = RichTextField(blank=True, features=FULL_EDITOR)
section_two_title = RichTextField(blank=True, features=FULL_EDITOR)
section_two_text = RichTextField(blank=True, features=FULL_EDITOR)
section_two_img = RichTextField(blank=True, features=FULL_EDITOR)
content_panels = Page.content_panels + [
MultiFieldPanel([
FieldPanel('section_one_title', classname="full"),
FieldPanel('section_one_text', classname="full"),
FieldPanel('section_one_img', classname="full"),
], heading="Section One"),
MultiFieldPanel([
FieldPanel('section_two_title', classname="full"),
FieldPanel('section_two_text', classname="full"),
FieldPanel('section_two_img', classname="full"),
], heading="Section Two"),
]