Co-authored-by: nick.moreton <nick.moreton@torchbox.com> Co-authored-by: Nick Moreton <nick.moreton@torchbox.com> Reviewed-on: #1
27 lines
759 B
Python
27 lines
759 B
Python
from django.db import models
|
|
from wagtail.admin.panels import FieldPanel
|
|
from wagtail.fields import RichTextField
|
|
from wagtail.models import Page
|
|
|
|
from wagtail_personalisation.models import PersonalisablePageMixin
|
|
|
|
|
|
class RegularPage(Page):
|
|
subtitle = models.CharField(max_length=255, blank=True, default="")
|
|
body = RichTextField(blank=True, default="")
|
|
|
|
content_panels = Page.content_panels + [
|
|
FieldPanel("subtitle"),
|
|
FieldPanel("body"),
|
|
]
|
|
|
|
|
|
class ContentPage(PersonalisablePageMixin, Page):
|
|
subtitle = models.CharField(max_length=255, blank=True, default="")
|
|
body = RichTextField(blank=True, default="")
|
|
|
|
content_panels = Page.content_panels + [
|
|
FieldPanel("subtitle"),
|
|
FieldPanel("body"),
|
|
]
|