浏览代码

Fix typo in block preview example

Matt Westcott 2 月之前
父节点
当前提交
4244943300
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      docs/topics/streamfield.md

+ 1 - 1
docs/topics/streamfield.md

@@ -537,7 +537,7 @@ You can also set `preview_value`, `preview_template`, and `description` as attri
 ```py
 class QuoteBlock(blocks.StructBlock):
     text = blocks.TextBlock()
-    attribute_name = blocks.CharBlock()
+    source = blocks.CharBlock()
 
     class Meta:
         preview_value = {"text": "This is the coolest CMS ever.", "source": "Willie Wagtail"}