소스 검색

Fix RichTextField to StreamField example migration

Jeremy Thompson 3 년 전
부모
커밋
4613fa2562
2개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 0
      CONTRIBUTORS.rst
  2. 1 1
      docs/topics/streamfield.md

+ 1 - 0
CONTRIBUTORS.rst

@@ -672,6 +672,7 @@ Contributors
 * Benita Anawonah
 * Anisha Singh
 * Ivy Jeptoo
+* Jeremy Thompson
 
 Translators
 ===========

+ 1 - 1
docs/topics/streamfield.md

@@ -629,7 +629,7 @@ from wagtail.rich_text import RichText
 def page_to_streamfield(page):
     changed = False
     if page.body.raw_text and not page.body:
-        page.body = [('rich_text', {'rich_text': RichText(page.body.raw_text)})]
+        page.body = [('rich_text', RichText(page.body.raw_text))]
         changed = True
     return page, changed