Release note and docs for #3315

pull/3742/head
Matt Westcott 2017-08-01 00:17:02 +01:00
rodzic 7556ffed3e
commit 4a5f3072bd
2 zmienionych plików z 9 dodań i 0 usunięć

Wyświetl plik

@ -24,6 +24,7 @@ Other features
* The admin interface now displays a title of the latest draft (Mikalai Radchuk)
* Added multi-select form field to the form builder (dwasyl)
* Improved performance of sitemap generation (Levi Adler)
* StreamField now respects the ``blank`` setting; StreamBlock accepts a ``required`` setting (Loic Teixeira)
Bug fixes
~~~~~~~~~
@ -38,6 +39,12 @@ Bug fixes
Upgrade considerations
======================
StreamField now defaults to ``blank=False``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StreamField now respects the ``blank`` field setting; when this is false, at least one block must be supplied for the field to pass validation. To match the behaviour of other model fields, ``blank`` defaults to ``False``; if you wish to allow a StreamField to be left empty, you must now add ``blank=True`` to the field.
Old configuration settings for embeds are deprecated
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Wyświetl plik

@ -443,6 +443,8 @@ Since ``StreamField`` accepts an instance of ``StreamBlock`` as a parameter, in
class HomePage(Page):
carousel = StreamField(CarouselBlock())
``StreamBlock`` accepts ``required`` as a keyword argument or ``Meta`` property; if true (the default), at least one sub-block must be supplied.
.. _streamfield_personblock_example: