Wagtail Clear StreamField
December 16, 2019 ยท View on GitHub
Note: this project hasn't been updated since 2017 and is no longer maintained. It is likely to break with the latest version of Wagtail.
Wagtail Clear StreamField
This is an amended version of Wagtail's StreamField interface that introduces a new class called ClearField
- Improved UI for nested StreamFields
- Always visible help text
- Confirmation on delete of StreamField items

Install
pip install wagtailclearstream- Add
wagtailclearstreamto your installed apps - Use
from wagtailclearstream import ClearBlockto import - Replace
StreamBlockwithClearBlock
Examples
Separate blocks.py file
#blocks.py
from wagtailclearstream import ClearBlock
class GlobalStreamBlock(ClearBlock):
paragraph = RichTextBlock(
icon="pilcrow",
template="blocks/paragraph.html"
)
...
#models.py
from .blocks import GlobalStreamBlock
class ExamplePage(Page):
body = StreamField(
GlobalStreamBlock(), blank=True
)
content_panels = Page.content_panels + [
StreamFieldPanel('body'),
]