From 35d1552070b6640020ec2b6f9ddd74ff6b56c942 Mon Sep 17 00:00:00 2001 From: Coen van der Kamp Date: Sat, 16 Oct 2021 20:58:36 +0200 Subject: [PATCH] Fix TableBlock -> TypedTableBlock in code samples --- docs/reference/contrib/typed_table_block.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/contrib/typed_table_block.md b/docs/reference/contrib/typed_table_block.md index a556372618..0744bd2dd1 100644 --- a/docs/reference/contrib/typed_table_block.md +++ b/docs/reference/contrib/typed_table_block.md @@ -30,7 +30,7 @@ from wagtail.images.blocks import ImageChooserBlock class DemoStreamBlock(blocks.StreamBlock): title = blocks.CharBlock() paragraph = blocks.RichTextBlock() - table = TableBlock([ + table = TypedTableBlock([ ('text', blocks.CharBlock()), ('numeric', blocks.FloatBlock()), ('rich_text', blocks.RichTextBlock()), @@ -41,7 +41,7 @@ class DemoStreamBlock(blocks.StreamBlock): To keep the UI as simple as possible for authors, it's generally recommended to use Wagtail's basic built-in block types as column types, as above. However, all custom block types and parameters are supported. For example, to define a 'country' column type consisting of a dropdown of country choices: ```python - table = TableBlock([ + table = TypedTableBlock([ ('text', blocks.CharBlock()), ('numeric', blocks.FloatBlock()), ('rich_text', blocks.RichTextBlock()),