add some basic search functionality
This commit is contained in:
@ -25,6 +25,7 @@ from wagtail.admin.panels import (
|
||||
TitleFieldPanel,
|
||||
)
|
||||
from wagtail.models import Orderable, Page, PageManager, PageQuerySet
|
||||
from wagtail.search import index
|
||||
from wagtail.snippets.models import register_snippet
|
||||
|
||||
from associations.widgets import AssociationChooserWidget
|
||||
@ -65,6 +66,8 @@ class EventIndex(Page):
|
||||
),
|
||||
]
|
||||
|
||||
search_fields = []
|
||||
|
||||
|
||||
@register_snippet
|
||||
@register_query_field("eventCategory", "eventCategories")
|
||||
@ -374,6 +377,8 @@ class EventPage(Page):
|
||||
),
|
||||
]
|
||||
|
||||
search_fields = Page.search_fields + [index.SearchField("body")]
|
||||
|
||||
def clean(self):
|
||||
super().clean()
|
||||
|
||||
|
Reference in New Issue
Block a user