0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 09:33:54 +01:00
wagtail/docs/releases/1.10.rst
2017-02-20 11:14:33 +01:00

65 lines
2.6 KiB
ReStructuredText

===========================================
Wagtail 1.10 release notes - IN DEVELOPMENT
===========================================
.. contents::
:local:
:depth: 1
What's new
==========
Other features
~~~~~~~~~~~~~~
* Use minified versions of jQuery and jQuery UI in the admin. Total savings without compression 371 KB (Tom Dyson)
* Hooks can now specify the order in which they are run (Gagaro)
* Added a ``submit_buttons`` block to login template (Gagaro)
* Added ``construct_image_chooser_queryset``, ``construct_document_chooser_queryset`` and ``construct_page_chooser_queryset`` hooks (Gagaro)
* The homepage created in the project template is now titled "Home" rather than "Homepage" (Karl Hobley)
* Signal receivers for custom ``Image`` and ``Rendition`` models are connected automatically (Mike Dingjan)
* ``PageChooserBlock`` can now accept a list/tuple of page models as ``target_model`` (Mikalai Radchuk)
* Styling tweaks for the ModelAdmin's ``IndexView`` to be more inline with the Wagtail styleguide (Andy Babic)
* Added `.nvmrc` to the project root for Node versioning support (Janneke Janssen)
Bug fixes
~~~~~~~~~
* Marked 'Date from' / 'Date to' strings in wagtailforms for translation (Vorlif)
* Unreliable preview is now reliable by always opening in a new window (Kjartan Sverrisson)
* Fixed placement of ``{{ block.super }}`` in ``snippets/type_index.html`` (LB (Ben Johnston))
* Optimised database queries on group edit page (Ashia Zawaduk)
Upgrade considerations
======================
Signals on custom ``Image`` and ``Rendition`` models connected automatically
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Projects using :ref:`custom image models <custom_image_model>` no longer need to set up signal receivers to handle deletion of image files and image feature detection, as these are now handled automatically by Wagtail. The following lines of code should be removed:
.. code-block:: python
# Delete the source image file when an image is deleted
@receiver(post_delete, sender=CustomImage)
def image_delete(sender, instance, **kwargs):
instance.file.delete(False)
# Delete the rendition image file when a rendition is deleted
@receiver(post_delete, sender=CustomRendition)
def rendition_delete(sender, instance, **kwargs):
instance.file.delete(False)
# Perform image feature detection (if enabled)
@receiver(pre_save, sender=CustomImage)
def image_feature_detection(sender, instance, **kwargs):
if not instance.has_focal_point():
instance.set_focal_point(instance.get_suggested_focal_point())