Skip to content

Commit

Permalink
PhonelistPage: add search_description to index
Browse files Browse the repository at this point in the history
The PhonelistPage doesn't inherit from BodyMixin.

Define our search_fields explicitly.
  • Loading branch information
donald committed Jan 6, 2020
1 parent 1199959 commit 1d2462f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mpicms/base/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 1d2462f

Please sign in to comment.