Add upgrade consideration note re direct use of Filter and Rendition

This commit is contained in:
Matt Westcott 2016-11-14 21:26:55 +00:00
parent b11c8a9a0b
commit 2c9805dc3f

View file

@ -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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~