Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hminnovation/wagtailclearstream
A work-in-progress app to make Wagtail's StreamField more modular
https://github.com/hminnovation/wagtailclearstream
streamfield wagtail
Last synced: 2 months ago
JSON representation
A work-in-progress app to make Wagtail's StreamField more modular
- Host: GitHub
- URL: https://github.com/hminnovation/wagtailclearstream
- Owner: hminnovation
- License: other
- Created: 2017-03-21T08:29:00.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-12-16T19:45:06.000Z (about 5 years ago)
- Last Synced: 2024-05-21T13:50:42.871Z (8 months ago)
- Topics: streamfield, wagtail
- Language: CSS
- Size: 683 KB
- Stars: 34
- Watchers: 4
- Forks: 7
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-wagtail - Wagtail ClearStream - An app to make Wagtail's StreamField more modular. (Apps / StreamField)
README
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![Screenshot](screenshot1.png)
![Screenshot](screenshot2.png)Install
-------- `pip install wagtailclearstream`
- Add `wagtailclearstream` to your installed apps
- Use `from wagtailclearstream import ClearBlock` to import
- Replace `StreamBlock` with `ClearBlock`Examples
--------### Separate blocks.py file
```
#blocks.py
from wagtailclearstream import ClearBlockclass GlobalStreamBlock(ClearBlock):
paragraph = RichTextBlock(
icon="pilcrow",
template="blocks/paragraph.html"
)
...#models.py
from .blocks import GlobalStreamBlockclass ExamplePage(Page):
body = StreamField(
GlobalStreamBlock(), blank=True
)content_panels = Page.content_panels + [
StreamFieldPanel('body'),
]
```