import logging from wagtail.admin.edit_handlers import FieldPanel, TabbedInterface, ObjectList from core.wagtail_utils import StrictHierarchyPage logger = logging.getLogger(__name__) class Chapter(StrictHierarchyPage): class Meta: verbose_name = 'Kapitel' verbose_name_plural = 'Kapitel' content_panels = [ FieldPanel('title', classname="full title"), ] settings_panels = [ FieldPanel('slug') ] edit_handler = TabbedInterface([ ObjectList(content_panels, heading='Content'), ObjectList(settings_panels, heading='Settings'), ]) template = 'generic_page.html' parent_page_types = ['book.Module'] subpage_types = ['book.ContentBlock']