From b0cda80626e3a1af7f24b37be76eda1de24250ca Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Mon, 15 Apr 2024 23:52:30 +0100 Subject: [PATCH] Simplify example of appending a rich text block to a streamfield --- docs/topics/streamfield.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/topics/streamfield.md b/docs/topics/streamfield.md index 0c0f0e82eb..12e77bf5f0 100644 --- a/docs/topics/streamfield.md +++ b/docs/topics/streamfield.md @@ -514,8 +514,7 @@ my_page.body[0] = ('heading', "My story") del my_page.body[-1] # Append a rich text block to the stream -from wagtail.rich_text import RichText -my_page.body.append(('paragraph', RichText("

And they all lived happily ever after.

"))) +my_page.body.append(('paragraph', "

And they all lived happily ever after.

")) # Save the updated data back to the database my_page.save()