From 194535120a74c1629900c8009e42e46eb6ce8c53 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Wed, 11 Feb 2015 13:38:23 +0000 Subject: [PATCH] New ListBlocks should consist of one empty item by default --- wagtail/wagtailadmin/blocks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wagtail/wagtailadmin/blocks.py b/wagtail/wagtailadmin/blocks.py index 4617f701b..feb8946fd 100644 --- a/wagtail/wagtailadmin/blocks.py +++ b/wagtail/wagtailadmin/blocks.py @@ -541,7 +541,8 @@ class StructBlock(six.with_metaclass(DeclarativeSubBlocksMetaclass, BaseStructBl class ListBlock(Block): class Meta: - default = [] + # Default to a list consisting of one empty child item (using None to trigger the child's empty / default rendering) + default = [None] def __init__(self, child_block, **kwargs): super(ListBlock, self).__init__(**kwargs)