Files
old-saburly-wagtail-web/home/models.py

63 lines
2.2 KiB
Python
Raw Normal View History

2024-08-27 20:33:44 +02:00
from __future__ import unicode_literals
from django.db import models
from wagtail.models import Page
from wagtail.fields import RichTextField
2024-09-10 20:21:33 +02:00
from wagtail.admin.panels import FieldPanel, MultiFieldPanel
2024-08-27 20:33:44 +02:00
class HomePage(Page):
2024-09-10 20:21:33 +02:00
section_one_title = RichTextField(blank=True)
section_one_text = RichTextField(blank=True)
section_one_img = RichTextField(blank=True)
section_two_title = RichTextField(blank=True)
section_two_text = RichTextField(blank=True)
section_two_img = RichTextField(blank=True)
section_three_title = RichTextField(blank=True)
section_three_text = RichTextField(blank=True)
section_three_img = RichTextField(blank=True)
section_four_title = RichTextField(blank=True)
section_four_text = RichTextField(blank=True)
section_four_img = RichTextField(blank=True)
section_five_title = RichTextField(blank=True)
section_five_text = RichTextField(blank=True)
section_five_img = RichTextField(blank=True)
2024-08-27 20:33:44 +02:00
content_panels = Page.content_panels + [
2024-09-10 20:21:33 +02:00
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"),
MultiFieldPanel([
FieldPanel('section_three_title', classname="full"),
FieldPanel('section_three_text', classname="full"),
FieldPanel('section_three_img', classname="full"),
], heading="Section Three"),
MultiFieldPanel([
FieldPanel('section_four_title', classname="full"),
FieldPanel('section_four_text', classname="full"),
FieldPanel('section_four_img', classname="full"),
], heading="Section Four"),
MultiFieldPanel([
FieldPanel('section_five_title', classname="full"),
FieldPanel('section_five_text', classname="full"),
FieldPanel('section_five_img', classname="full"),
], heading="Section Five"),
]