Skip to content
Snippets Groups Projects
Commit 2e22b9e3 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Add search index for people

parent a02f0aa9
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@ from wagtail.admin.edit_handlers import (
StreamFieldPanel
)
from wagtail.images.edit_handlers import ImageChooserPanel
from wagtail.search import index
from opentech.public.utils.blocks import StoryBlock
from opentech.public.utils.models import BasePage, BaseFunding, FundingMixin, RelatedPage
......@@ -146,6 +147,11 @@ class PersonPage(FundingMixin, BasePage):
biography = StreamField(StoryBlock(), blank=True)
email = models.EmailField(blank=True)
search_fields = BasePage.search_fields + [
index.SearchField('introduction'),
index.SearchField('biography')
]
content_panels = BasePage.content_panels + [
MultiFieldPanel([
FieldPanel('first_name'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment