0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 03:31:04 +01:00
wagtail/docs/releases/2.12.rst

51 lines
2.7 KiB
ReStructuredText
Raw Normal View History

2020-10-23 17:55:21 +02:00
===========================================
2020-10-23 21:07:51 +02:00
Wagtail 2.12 release notes - IN DEVELOPMENT
2020-10-23 17:55:21 +02:00
===========================================
.. contents::
:local:
:depth: 1
What's new
==========
2020-12-08 19:23:56 +01:00
In-place StreamField updating
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
StreamField values now formally support being updated in-place from Python code, allowing blocks to be inserted, modified and deleted rather than having to assign a new list of blocks to the field. For further details, see :ref:`modifying_streamfield_data`. This feature was developed by Matt Westcott.
2020-10-23 17:55:21 +02:00
Other features
~~~~~~~~~~~~~~
* Added support for Python 3.9
* Added ``WAGTAILIMAGES_IMAGE_FORM_BASE`` and ``WAGTAILDOCS_DOCUMENT_FORM_BASE`` settings to customise the forms for images and documents (Dan Braghis)
* Switch pagination icons to use SVG instead of icon fonts (Scott Cranfill)
* Added string representation to image Format class (Andreas Nüßlein)
* Support returning None from ``register_page_action_menu_item`` and ``register_snippet_action_menu_item`` to skip registering an item (Vadim Karpenko)
2020-10-23 17:55:21 +02:00
Bug fixes
~~~~~~~~~
* Stop menu icon overlapping the breadcrumb on small viewport widths in page editor (Karran Besen)
* Make sure document chooser pagination preserves the selected collection when moving between pages (Alex Sa)
2020-10-23 17:55:21 +02:00
Upgrade considerations
======================
Removed support for Elasticsearch 2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Elasticsearch version 2 is no longer supported as of this release; please upgrade to Elasticsearch 5 or above before upgrading Wagtail.
2020-12-08 19:23:56 +01:00
``stream_data`` on StreamField values is deprecated
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``stream_data`` property of StreamValue is commonly used to access the underlying data of a StreamField. However, this is discouraged, as it is an undocumented internal attribute and has different data representations depending on whether the value originated from the database or in memory, typically leading to errors on preview if this has not been properly accounted for. As such, ``stream_data`` is now deprecated.
The recommended alternative is to index the StreamField value directly as a list; for example, ``page.body[0].block_type`` and ``page.body[0].value`` instead of ``page.body.stream_data[0]['type']`` and ``page.body.stream_data[0]['value']``. This has the advantage that it will return the same Python objects as when the StreamField is used in template code (such as Page instances for ``PageChooserBlock``). However, in most cases, existing code using ``stream_data`` is written to expect the raw JSON-like representation of the data, and for this the new property ``raw_data`` (added in Wagtail 2.12) can be used as a drop-in replacement for ``stream_data``.