2018-12-07 11:25:40 +00:00
==========================================
Wagtail 2.5 release notes - IN DEVELOPMENT
==========================================
.. contents ::
:local:
:depth: 1
What's new
==========
Other features
~~~~~~~~~~~~~~
2019-01-11 15:22:37 +00:00
* Added support for customising EditHandler-based forms on a per-request basis (Bertrand Bordage)
2018-12-30 06:32:28 +00:00
* Added more informative error message when `` |richtext `` filter is applied to a non-string value (mukesh5)
2018-12-07 11:00:30 +00:00
* Automatic search indexing can now be disabled on a per-model basis via the `` search_auto_update `` attribute (Karl Hobley)
2018-11-28 20:58:35 +00:00
* Improved diffing of StreamFields when comparing page revisions (Karl Hobley)
2019-02-02 17:04:01 +00:00
* Highlight broken links to pages and missing documents in rich text (Brady Moe)
2019-02-06 22:01:03 +00:00
* Preserve links when copy-pasting rich text content from Wagtail to other tools (Thibaud Colas)
2018-11-26 19:28:49 +00:00
* Rich text to contentstate conversion now prioritises more specific rules, to accommodate `` <p> `` and `` <br> `` elements with attributes (Matt Westcott)
2019-02-23 14:15:07 +00:00
* Added limit image upload size by number of pixels (Thomas Elliott)
2019-01-25 14:48:22 +00:00
* Added `` manage.py wagtail_update_index `` alias to avoid clashes with `` update_index `` commands from other packages (Matt Westcott)
2019-03-06 11:24:44 +00:00
* Renamed `` target_model `` argument on `` PageChooserBlock `` to `` page_type `` (Loic Teixeira)
2018-11-14 15:30:03 +00:00
* `` edit_handler `` and `` panels `` can now be defined on a `` ModelAdmin `` definition (Thomas Kremmel)
2019-03-01 16:41:44 +00:00
* Add Learn Wagtail to third-party tutorials in documentation (Matt Westcott)
2019-03-04 20:17:48 +00:00
* Add a Django setting `` TAG_LIMIT `` to limit number of tags that can be added to any taggit model (Mani)
2019-01-30 09:30:15 +00:00
* Added instructions on how to generate urls for `` ModelAdmin `` to documentation (LB (Ben Johnston), Andy Babic)
2018-06-12 12:03:52 +00:00
* Added option to specify a fallback URL on `` {% pageurl %} `` (Arthur Holzner)
2018-12-30 06:32:28 +00:00
2018-12-07 11:25:40 +00:00
Bug fixes
~~~~~~~~~
2018-12-07 20:17:17 +00:00
* Set `` SERVER_PORT `` to 443 in `` Page.dummy_request() `` for HTTPS sites (Sergey Fedoseev)
2018-12-12 05:30:32 +00:00
* Include port number in `` Host `` header of `` Page.dummy_request() `` (Sergey Fedoseev)
2018-12-14 17:44:46 +00:00
* Validation error messages in `` InlinePanel `` no longer count towards `` max_num `` when disabling the 'add' button (Todd Dembrey, Thibaud Colas)
2019-01-23 15:20:13 +00:00
* Rich text to contentstate conversion now ignores stray closing tags (frmdstryr)
2019-01-26 15:39:45 +00:00
* Escape backslashes in `` postgres_search `` queries (Hammy Goonan)
2019-01-29 11:58:12 +00:00
* Parent page link in page chooser search results no longer navigates away (Asanka Lihiniyagoda, Sævar Öfjörð Magnússon)
2019-02-24 11:37:50 +00:00
* `` routablepageurl `` tag now correctly omits domain part when multiple sites exist at the same root (Gassan Gousseinov)
2019-02-27 15:18:10 +00:00
* Added missing collection column specifier on document listing template (Sergey Fedoseev)
2019-02-26 22:04:56 +00:00
* Page Copy will now also copy ParentalManyToMany field relations (LB (Ben Johnston))
2019-02-19 12:31:36 +00:00
* Admin HTML header now includes correct language code (Matt Westcott)
2019-02-03 16:47:51 +00:00
* Unclear error message when saving image after focal point edit (Hugo van den Berg)
2019-03-04 16:09:44 +00:00
* Increase max length on `` Embed.thumbnail_url `` to 255 characters (Kevin Howbrook)
* `` send_mail `` now correctly uses the `` html_message `` kwarg for HTML messages (Tiago Requeijo)
* Page copying no longer allowed if page model has reached its `` max_count `` (Andy Babic)
2019-02-20 10:39:55 +00:00
* Don't show page type on page chooser button when multiple types are allowed (Thijs Kramer)
2019-03-13 14:44:12 +00:00
* Make sure page chooser search results correspond to the latest search by canceling previous requests (Esper Kuijs)
2019-03-14 13:43:28 +00:00
* Inform user when moving a page from one parent to another where there is an already existing page with the same slug (Casper Timmers)
2019-03-14 13:08:47 +00:00
* User add/edit forms now support form widgets with JS/CSS media (Damian Grinwis)
2019-03-14 16:31:10 +00:00
* Rich text processing now preserves non-breaking spaces instead of converting them to normal spaces (Wesley van Lee)
2018-12-07 20:17:17 +00:00
2018-12-07 11:25:40 +00:00
Upgrade considerations
======================
2019-01-11 15:22:37 +00:00
`` EditHandler.bind_to_model `` and `` EditHandler.bind_to_instance `` deprecated
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The internal `` EditHandler `` methods `` bind_to_model `` and `` bind_to_instance `` have been deprecated, in favour of a new combined `` bind_to `` method which accepts `` model `` , `` instance `` , `` request `` and `` form `` as optional keyword arguments. Any user code which calls `` EditHandler.bind_to_model(model) `` should be updated to use `` EditHandler.bind_to(model=model) `` instead; any user code which calls `` EditHandler.bind_to_instance(instance, request, form) `` should be updated to use `` EditHandler.bind_to(instance=instance, request=request, form=form) `` .
2019-03-14 11:11:16 +00:00
Changes to admin pagination helpers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A number of changes have been made to pagination handling within the Wagtail admin; these are internal API changes, but may affect applications and third-party packages that add new paginated object listings, including chooser modals, to the admin. The `` paginate `` function in `` wagtail.utils.pagination `` has been deprecated in favour of the `` django.core.paginator.Paginator.get_page `` method introduced in Django 2.0 - a call such as:
.. code-block :: python
from wagtail.utils.pagination import paginate
paginator, page = paginate(request, object_list, per_page=25)
should be replaced with:
.. code-block :: python
from django.core.paginator import Paginator
paginator = Paginator(object_list, per_page=25)
page = paginator.get_page(request.GET.get('p'))
Additionally, the `` is_ajax `` flag on the template `` wagtailadmin/shared/pagination_nav.html `` has been deprecated in favour of a new template `` wagtailadmin/shared/ajax_pagination_nav.html `` :
.. code-block :: html+django
{% include "wagtailadmin/shared/pagination_nav.html" with items=page_obj is_ajax=1 %}
should become:
.. code-block :: html+django
{% include "wagtailadmin/shared/ajax_pagination_nav.html" with items=page_obj %}