16 lines
568 B
Python
16 lines
568 B
Python
|
from wagtail.core.fields import StreamField
|
||
|
from wagtail.core import blocks
|
||
|
from wagtail.images.blocks import ImageChooserBlock
|
||
|
from wagtail.documents.blocks import DocumentChooserBlock
|
||
|
from wagtail.embeds.blocks import EmbedBlock
|
||
|
from wagtailmarkdown.blocks import MarkdownBlock
|
||
|
|
||
|
def build_stream_field():
|
||
|
return StreamField([
|
||
|
('document', DocumentChooserBlock()),
|
||
|
('image', ImageChooserBlock()),
|
||
|
('markdown', MarkdownBlock()),
|
||
|
('paragraph', blocks.RichTextBlock()),
|
||
|
('raw_html', blocks.RawHTMLBlock(label="Raw HTML")),
|
||
|
])
|