Reset search fields

This commit is contained in:
Oleg Lavrovsky 2017-05-03 23:35:23 +02:00
parent ece16f5efa
commit 4ba2d0057d
2 changed files with 1 additions and 12 deletions

View file

@ -12,14 +12,13 @@ from wagtail.wagtailadmin.edit_handlers import (
FieldPanel, FieldRowPanel, FieldPanel, FieldRowPanel,
InlinePanel, MultiFieldPanel InlinePanel, MultiFieldPanel
) )
from wagtail.wagtailsearch import index
from ..util import TranslatedField from ..util import TranslatedField
class ContactFormField(AbstractFormField): class ContactFormField(AbstractFormField):
page = ParentalKey('ContactForm', related_name='form_fields') page = ParentalKey('ContactForm', related_name='form_fields')
class ContactForm(AbstractEmailForm, index.Indexed): class ContactForm(AbstractEmailForm):
intro = RichTextField(default='', blank=True) intro = RichTextField(default='', blank=True)
thanks = RichTextField(default='', blank=True) thanks = RichTextField(default='', blank=True)
@ -36,7 +35,6 @@ class ContactForm(AbstractEmailForm, index.Indexed):
], "Email"), ], "Email"),
] ]
search_fields = []
parent_page_types = ['home.ArticleIndexPage'] parent_page_types = ['home.ArticleIndexPage']
class Meta: class Meta:
verbose_name = "Formular" verbose_name = "Formular"

View file

@ -11,7 +11,6 @@ from wagtail.wagtailcore.fields import StreamField, RichTextField
from wagtail.wagtailadmin.edit_handlers import FieldPanel, StreamFieldPanel, InlinePanel, MultiFieldPanel from wagtail.wagtailadmin.edit_handlers import FieldPanel, StreamFieldPanel, InlinePanel, MultiFieldPanel
from wagtail.wagtailimages.blocks import ImageChooserBlock from wagtail.wagtailimages.blocks import ImageChooserBlock
from wagtail.wagtailimages.edit_handlers import ImageChooserPanel from wagtail.wagtailimages.edit_handlers import ImageChooserPanel
from wagtail.wagtailsearch import index
from puput.models import EntryPage from puput.models import EntryPage
@ -111,14 +110,6 @@ class ArticlePage(Page):
related_name='+' related_name='+'
) )
search_fields = Page.search_fields + [
index.SearchField('body_de'),
index.SearchField('body_fr'),
index.SearchField('title'),
index.SearchField('title_fr'),
index.SearchField('intro_de'),
index.SearchField('intro_fr'),
]
content_panels = [ content_panels = [
MultiFieldPanel([ MultiFieldPanel([
FieldPanel('title'), FieldPanel('title'),