Overview
Wagtail 2.15, released on November 4, 2021, is an LTS release with extended support. It improves the content editor and search system.
Main Features
Improved editor
The rich text editor is improved with new StreamField blocks and better copy-paste handling.
python
from wagtail.core.models import Page
from wagtail.core.fields import StreamField
from wagtail.core import blocks
class BlogPage(Page):
body = StreamField([
('heading', blocks.CharBlock()),
('paragraph', blocks.RichTextBlock()),
('image', ImageChooserBlock()),
], use_json_field=True)
Improved search
The search backend better supports complex queries and StreamField field indexing.
python
from wagtail.search import index
class ArticlePage(Page):
body = RichTextField()
search_fields = Page.search_fields + [
index.SearchField('body'),
index.AutocompleteField('title'),
]
