A short demo of Wagtail's StreamField feature.
StreamField provides a content editing model suitable for pages that do not follow a fixed structure - such as blog posts or news stories - where the text may be interspersed with subheadings, images, pull quotes and video.
It’s also suitable for more specialised content types, such as maps and charts (or, for a programming blog, code snippets). In this model, these different content types are represented as a sequence of ‘blocks’, which can be repeated and arranged in any order.
For further background on StreamField, and why you would use it instead of a rich text field for the article body, see the blog post Rich text fields and faster horses: torchbox.com/blog/rich-text-f...
11 май 2021