Update docs/releases/2.13.rst

Co-authored-by: Matt Westcott <matthew@torchbox.com>
pull/11046/head
LB (Ben Johnston) 2023-10-13 20:41:35 +10:00 zatwierdzone przez Matt Westcott
rodzic 327a31f6ae
commit 59b1d0ada2
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -110,7 +110,7 @@ Wagtail 2.13 will be the last Wagtail release to support IE11. Users accessing t
Updated handling of non-required StreamFields
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The rules for determining whether a StreamField is required (i.e. at least one block must be provided) have been simplified and made consistent with other field types. Non-required fields are now indicated by ``blank=True`` on the ``StreamField`` definition; the default is ``blank=False`` (the field is required). In previous versions, to make a field non-required, it was necessary to define a top-level `StreamBlock<wagtail.blocks.StreamBlock>` with ``required=False`` (which applied the validation rule) as well as setting ``blank=True`` (which removed the asterisk from the form field). You should review your use of StreamField to check that ``blank=True`` is used on the fields you wish to make optional.
The rules for determining whether a StreamField is required (i.e. at least one block must be provided) have been simplified and made consistent with other field types. Non-required fields are now indicated by ``blank=True`` on the ``StreamField`` definition; the default is ``blank=False`` (the field is required). In previous versions, to make a field non-required, it was necessary to define a top-level ``StreamBlock`` with ``required=False`` (which applied the validation rule) as well as setting ``blank=True`` (which removed the asterisk from the form field). You should review your use of StreamField to check that ``blank=True`` is used on the fields you wish to make optional.
New client-side implementation for custom StreamField blocks