-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathmodels.py
More file actions
56 lines (48 loc) · 2.29 KB
/
models.py
File metadata and controls
56 lines (48 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
from cms.components.page.blocks.communities_section import CommunitiesSection
from cms.components.page.blocks.dynamic_content_display_section import (
DynamicContentDisplaySection,
)
from cms.components.page.blocks.homepage_hero import HomepageHero
from cms.components.page.blocks.sponsors_section import SponsorsSection
from cms.components.home.blocks.home_intro_section import HomeIntroSection
from cms.components.page.blocks.keynoters_section import KeynotersSection
from cms.components.page.blocks.schedule_preview_section import SchedulePreviewSection
from cms.components.page.blocks.socials_section import SocialsSection
from cms.components.page.blocks.special_guest_section import SpecialGuestSection
from cms.components.page.blocks.information_section import InformationSection
from cms.components.news.blocks.news_grid_section import NewsGridSection
from cms.components.page.blocks.live_streaming_section import LiveStreamingSection
from cms.mixins import CustomHeadlessMixin
from wagtail.models import Page
from wagtail.admin.panels import FieldPanel
from wagtail.fields import StreamField
from cms.components.page.blocks.text_section import TextSection
from cms.components.page.blocks.slider_cards_section import SliderCardsSection
from cms.components.page.blocks.checkout_section import CheckoutSection
from cms.components.base.blocks.map import Map
from wagtail import blocks
class BodyBlock(blocks.StreamBlock):
text_section = TextSection()
map = Map()
slider_cards_section = SliderCardsSection()
sponsors_section = SponsorsSection()
home_intro_section = HomeIntroSection()
keynoters_section = KeynotersSection()
schedule_preview_section = SchedulePreviewSection()
socials_section = SocialsSection()
special_guest_section = SpecialGuestSection()
information_section = InformationSection()
news_grid_section = NewsGridSection()
checkout_section = CheckoutSection()
live_streaming_section = LiveStreamingSection()
homepage_hero = HomepageHero()
dynamic_content_display_section = DynamicContentDisplaySection()
communities_section = CommunitiesSection()
class GenericPage(CustomHeadlessMixin, Page):
body = StreamField(
BodyBlock(),
use_json_field=True,
)
content_panels = Page.content_panels + [
FieldPanel("body"),
]