=========================================== 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) * Update default attribute copying behaviour of ``Page.get_specific()`` and added the ``copy_attrs_exclude`` option (Andy Babic) * Update ``PageQueryset.specific(defer=True)`` to only perform a single database query (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` 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.