make a common stream field, support all block types everywhere

This commit is contained in:
2024-05-20 22:42:30 +02:00
parent e88aa5e142
commit a7e83a3163
11 changed files with 117 additions and 61 deletions
+13
View File
@@ -0,0 +1,13 @@
from wagtail import blocks
from wagtail.fields import StreamField
from dnscms.blocks import ImageSliderBlock, ImageWithTextBlock
CommonStreamField = StreamField(
[
("paragraph", blocks.RichTextBlock(label="Rik tekst")),
("image", ImageWithTextBlock(label="Bilde")),
("image_slider", ImageSliderBlock(label="Bildegalleri")),
],
default=[("paragraph", "")],
)