From 1d2462fcd162d82e4fad8f17ab8b4308796d5c02 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Mon, 6 Jan 2020 16:18:19 +0100 Subject: [PATCH] PhonelistPage: add search_description to index The PhonelistPage doesn't inherit from BodyMixin. Define our search_fields explicitly. --- mpicms/base/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mpicms/base/models.py b/mpicms/base/models.py index fe3d745..7a9ad74 100644 --- a/mpicms/base/models.py +++ b/mpicms/base/models.py @@ -10,6 +10,7 @@ from wagtail.admin.edit_handlers import StreamFieldPanel from wagtail.images.edit_handlers import ImageChooserPanel from wagtail.core.fields import StreamField +from wagtail.search import index from mpicms.news.mixins import NewsMixin from mpicms.events.mixins import EventMixin @@ -121,6 +122,9 @@ class Meta: # noqa class PhonelistPage(BasePage): content_panels = Page.content_panels promote_panels = Page.promote_panels + search_fields = [ + index.SearchField("search_description"), + ] class Meta: # noqa verbose_name = _("Phonelist")