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

101 lines
3.8 KiB
Python

from __future__ import unicode_literals
from django.db import models
from wagtail.fields import RichTextField
from wagtail.admin.panels import FieldPanel, MultiFieldPanel
from wagtail.models import Page
from saburly.custom_editor import FULL_EDITOR
class ServicesPage(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)
section_three_title = RichTextField(blank=True, features=FULL_EDITOR)
section_three_text = RichTextField(blank=True, features=FULL_EDITOR)
section_three_img = RichTextField(blank=True, features=FULL_EDITOR)
section_four_title = RichTextField(blank=True, features=FULL_EDITOR)
section_four_text = RichTextField(blank=True, features=FULL_EDITOR)
section_four_img = RichTextField(blank=True, features=FULL_EDITOR)
section_five_title = RichTextField(blank=True, features=FULL_EDITOR)
section_five_text = RichTextField(blank=True, features=FULL_EDITOR)
section_five_img = RichTextField(blank=True, features=FULL_EDITOR)
sub_section_one = RichTextField(blank=True, features=FULL_EDITOR)
sub_section_one_img = RichTextField(blank=True, features=FULL_EDITOR)
sub_section_two = RichTextField(blank=True, features=FULL_EDITOR)
sub_section_two_img = RichTextField(blank=True, features=FULL_EDITOR)
sub_section_three = RichTextField(blank=True, features=FULL_EDITOR)
sub_section_three_img = RichTextField(blank=True, features=FULL_EDITOR)
sub_section_four = RichTextField(blank=True, features=FULL_EDITOR)
sub_section_four_img = RichTextField(blank=True, features=FULL_EDITOR)
sub_section_five = RichTextField(blank=True, features=FULL_EDITOR)
sub_section_five_img = RichTextField(blank=True, features=FULL_EDITOR)
sub_section_six = RichTextField(blank=True, features=FULL_EDITOR)
sub_section_six_img = RichTextField(blank=True, features=FULL_EDITOR)
content_panels = Page.content_panels + [
MultiFieldPanel([
FieldPanel('section_one_title'),
FieldPanel('section_one_text'),
FieldPanel('section_one_img'),
], heading="Section 1"),
MultiFieldPanel([
FieldPanel('section_two_title'),
FieldPanel('section_two_text'),
FieldPanel('section_two_img'),
], heading="Section 2"),
MultiFieldPanel([
FieldPanel('section_three_title'),
FieldPanel('section_three_text'),
FieldPanel('section_three_img'),
], heading="Section 3"),
MultiFieldPanel([
FieldPanel('section_four_title'),
FieldPanel('section_four_text'),
FieldPanel('section_four_img'),
], heading="Section 4"),
MultiFieldPanel([
FieldPanel('section_five_title'),
FieldPanel('section_five_text'),
FieldPanel('section_five_img'),
], heading="Section 5"),
MultiFieldPanel([
FieldPanel('sub_section_one'),
FieldPanel('sub_section_one_img'),
FieldPanel('sub_section_two'),
FieldPanel('sub_section_two_img'),
FieldPanel('sub_section_three'),
FieldPanel('sub_section_three_img'),
FieldPanel('sub_section_four'),
FieldPanel('sub_section_four_img'),
FieldPanel('sub_section_five'),
FieldPanel('sub_section_five_img'),
FieldPanel('sub_section_six'),
FieldPanel('sub_section_six_img'),
], heading="Section 5 Subfields"),
]