This Wagtail app provides several ui improvements to the Wagtail editor interface.
Project description
Wagtail UI Plus
This Wagtail app provides several ui improvements to the Wagtail editor interface.
- Improved UI for StreamFields
- Improved UI for StreamBlocks nested inside StreamFields
Preview
Install
pip install wagtailuiplus- Add
wagtailuiplusto your installed apps
Example
The following code was used in a models.py file to generate the above screenshot.
from wagtail.admin.edit_handlers import StreamFieldPanel
from wagtail.core.blocks import (
CharBlock,
StreamBlock,
StructBlock,
RichTextBlock,
)
from wagtail.core.fields import StreamField
from wagtail.core.models import Page
class MyCharBlock(CharBlock):
class Meta:
icon = 'pilcrow'
label = 'My char block'
class MyRichTextBlock(RichTextBlock):
class Meta:
icon = 'openquote'
label = 'My rich text block'
class MyStreamBlock(StreamBlock):
title = MyCharBlock()
text = MyRichTextBlock()
class Meta:
label = 'My stream block'
class MyStructBlock(StructBlock):
items = MyStreamBlock(required=False)
class Meta:
icon = 'list-ul'
label = 'My struct block'
class HomePage(Page):
my_stream_field = StreamField([
('my_title_block', MyCharBlock()),
('my_text_block', MyRichTextBlock()),
('my_struct_block', MyStructBlock()),
], blank=True, verbose_name='My stream field')
content_panels = [
StreamFieldPanel('my_stream_field'),
]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wagtailuiplus-1.0.0.tar.gz
(3.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wagtailuiplus-1.0.0.tar.gz.
File metadata
- Download URL: wagtailuiplus-1.0.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.5.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c564db9de782e65ee0acc0fcf78bae679cc77eaa0b1d643df52e4db5f76985a
|
|
| MD5 |
7c46558d470b7444052a6803970048b4
|
|
| BLAKE2b-256 |
f863e0a7057bb86b9e8cc93bcff37fb4c3efa7537ae35723344e977d62332e85
|
File details
Details for the file wagtailuiplus-1.0.0-py3-none-any.whl.
File metadata
- Download URL: wagtailuiplus-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.5.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.7.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60d8e3f86a38d8747c20d07a82df8ff17b04799f8398f5b5c8e3a53601ed97b7
|
|
| MD5 |
29df9255881fc3619708df765745fbf9
|
|
| BLAKE2b-256 |
b255e34f9cd474071d70a349a8bc99fa059bd2412edc09ff85d1b8c7483c0053
|