From 2c9805dc3fa37e9bf27fc7593de4465673faffca Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Mon, 14 Nov 2016 21:26:55 +0000 Subject: [PATCH] Add upgrade consideration note re direct use of Filter and Rendition --- docs/releases/1.8.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/releases/1.8.rst b/docs/releases/1.8.rst index 26ff63db4..16e497eab 100644 --- a/docs/releases/1.8.rst +++ b/docs/releases/1.8.rst @@ -104,6 +104,11 @@ to: You will then be able to run ``manage.py makemigrations`` and ``manage.py migrate`` as normal. +Additionally, third-party code that accesses the Filter and Rendition models directly should note the following and make updates where applicable: + + * ``Filter`` will no longer be a Django model as of Wagtail 1.9, and as such, ORM operations on it (such as ``save()`` and ``Filter.objects``) are deprecated. It should be instantiated and used as an in-memory object instead - for example, ``flt, created = Filter.objects.get_or_create(spec='fill-100x100')`` should become ``flt = Filter(spec='fill-100x100')``. + * The ``filter`` field of Rendition models is no longer in use; lookups should instead be performed on the ``filter_spec`` field, which contains a filter spec string such as ``'fill-100x100'``. + ``wagtail.wagtailimages.models.get_image_model`` has moved ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~