add support for previewing pages
This commit is contained in:
@@ -10,13 +10,14 @@ from wagtail.admin.panels import FieldPanel
|
||||
from wagtail.fields import RichTextField
|
||||
from wagtail.models import Page
|
||||
from wagtail.search import index
|
||||
from wagtail_headless_preview.models import HeadlessMixin
|
||||
|
||||
from dnscms.fields import CommonStreamField
|
||||
from dnscms.wordpress.models import WPImportedPageMixin
|
||||
|
||||
|
||||
@register_singular_query_field("associationIndex")
|
||||
class AssociationIndex(Page):
|
||||
class AssociationIndex(HeadlessMixin, Page):
|
||||
max_count = 1
|
||||
subpage_types = ["associations.AssociationPage"]
|
||||
|
||||
@@ -37,7 +38,7 @@ class AssociationIndex(Page):
|
||||
search_fields = Page.search_fields
|
||||
|
||||
|
||||
class AssociationPage(WPImportedPageMixin, Page):
|
||||
class AssociationPage(HeadlessMixin, WPImportedPageMixin, Page):
|
||||
subpage_types = []
|
||||
parent_page_types = ["associations.AssociationIndex"]
|
||||
show_in_menus = False
|
||||
|
||||
Reference in New Issue
Block a user