1
Fork 0
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

23 lines
579 B
Python
Raw Normal View History

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')
]