1
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
wagtail-website-2018-spike/project/pages/models.py
2018-07-27 21:37:11 +01:00

23 lines
583 B
Python

from django.db import models
from project.common.blocks import build_stream_field
from project.common.models import Entity
from wagtail.admin.edit_handlers import FieldPanel, StreamFieldPanel
class SimpleContentPage(Entity):
body = build_stream_field()
content_panels = Entity.content_panels + [
StreamFieldPanel('body')
]
class SectionIndexPage(Entity):
body = build_stream_field()
hide_list = models.BooleanField(default=False)
content_panels = Entity.content_panels + [
StreamFieldPanel('body'),
FieldPanel('hide_list')
]