0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 17:36:49 +01:00
wagtail/docs/releases/2.13.rst
2021-03-02 20:43:12 +00:00

38 lines
2.0 KiB
ReStructuredText

===========================================
Wagtail 2.13 release notes - IN DEVELOPMENT
===========================================
.. contents::
:local:
:depth: 1
What's new
==========
Other features
~~~~~~~~~~~~~~
* Support passing ``min_num``, ``max_num`` and ``block_counts`` arguments directly to ``StreamField`` (Haydn Greatnews, Matt Westcott)
* Add the option to set rich text images as decorative, without alt text (Helen Chapman, Thibaud Colas)
* Add support for ``__year`` filter in Elasticsearch queries (Seb Brown)
* Support passing multiple models as arguments to ``type()``, ``not_type()``, ``exact_type()`` and ``not_exact_type()`` methods on ``PageQuerySet`` (Andy Babic)
* Updated default attribute copying behaviour of ``Page.get_specific()`` and added the ``copy_attrs_exclude`` option (Andy Babic)
Bug fixes
~~~~~~~~~
* StreamField required status is now consistently handled by the ``blank`` keyword argument (Matt Westcott)
* Show 'required' asterisks for blocks inside required StreamFields (Matt Westcott)
* Make image chooser "Select format" fields translatable (Helen Chapman, Thibaud Colas)
Upgrade considerations
======================
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 :ref:`a top-level StreamBlock<streamfield_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.