Search indexing
This commit is contained in:
parent
2913344224
commit
8c6eedf232
2 changed files with 9 additions and 6 deletions
3
Makefile
3
Makefile
|
@ -45,6 +45,9 @@ release:
|
|||
docker-compose kill web
|
||||
docker-compose up -d web
|
||||
|
||||
reindex:
|
||||
docker-compose exec web ./manage.py update_index
|
||||
|
||||
django-exec-bash:
|
||||
# execute bash in the currently running container
|
||||
docker-compose exec web bash
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
|
||||
from modelcluster.fields import ParentalKey
|
||||
|
||||
from wagtail.wagtailadmin.edit_handlers import (
|
||||
FieldPanel, FieldRowPanel,
|
||||
InlinePanel, MultiFieldPanel
|
||||
)
|
||||
|
||||
from django.db.models import CharField
|
||||
|
||||
from wagtail.wagtailcore.fields import RichTextField
|
||||
from wagtail.wagtailforms.models import (
|
||||
AbstractEmailForm, AbstractFormField
|
||||
)
|
||||
from wagtail.wagtailadmin.edit_handlers import (
|
||||
FieldPanel, FieldRowPanel,
|
||||
InlinePanel, MultiFieldPanel
|
||||
)
|
||||
from wagtail.wagtailsearch import index
|
||||
|
||||
from ..util import TranslatedField
|
||||
|
@ -19,7 +19,7 @@ from ..util import TranslatedField
|
|||
class ContactFormField(AbstractFormField):
|
||||
page = ParentalKey('ContactForm', related_name='form_fields')
|
||||
|
||||
class ContactForm(AbstractEmailForm):
|
||||
class ContactForm(AbstractEmailForm, index.Indexed):
|
||||
intro = RichTextField(default='', blank=True)
|
||||
thanks = RichTextField(default='', blank=True)
|
||||
|
||||
|
|
Loading…
Reference in a new issue