from django.db import models from wagtail.core.models import Page from wagtail.core.fields import RichTextField, StreamField from wagtail.admin.edit_handlers import FieldPanel, MultiFieldPanel class HomePage(Page): body = RichTextField(blank=True) content_panels = Page.content_panels + [ FieldPanel('body', classname="full") ] class ProjectPage(Page): author = models.TextField(blank=True) keywords = models.TextField(blank=True) objectives = RichTextField(blank=True) estimations = RichTextField(blank=True) period = models.TextField(blank=True) budget = models.TextField(blank=True) body = RichTextField(blank=True) content_panels = Page.content_panels + [ MultiFieldPanel([ FieldPanel('author'), FieldPanel('keywords'), FieldPanel('objectives'), FieldPanel('estimations'), FieldPanel('period'), FieldPanel('budget')], 'Meta data' ), FieldPanel('body', classname="full") ]