Wagtail 0.5 release notes¶
August 1, 2014
Multiple image uploader¶
The image uploader UI has been improved to allow multiple images to be uploaded at once.
Image feature detection¶
Wagtail can now apply face and feature detection on images using OpenCV, and use this to intelligently crop images.
Using images outside Wagtail¶
In normal use, Wagtail will generate resized versions of images at the point that they are referenced on a template, which means that those images are not easily accessible for use outside of Wagtail, such as displaying them on external sites. Wagtail now provides a way to obtain URLs to your images, at any size.
RoutablePage model has been added to allow embedding Django-style URL routing within a page.
Usage stats for images, documents and snippets¶
It’s now easier to find where a particular image, document or snippet is being used on your site.
WAGTAIL_USAGE_COUNT_ENABLED setting to
True and an icon will appear on the edit page showing you which pages they have been used on.
Copy Page action¶
The explorer interface now offers the ability to copy pages, with or without subpages.
Hooks can now be defined using decorator syntax:
def construct_main_menu(request, menu_items):
MenuItem('Kittens!', '/kittens/', classnames='icon icon-folder-inverse', order=1000)
The lxml library (used for whitelisting and rewriting of rich text fields) has been replaced with the pure-python html5lib library, to simplify installation.
page_unpublishedsignal has been added.
Explorer nav now rendered separately and fetched with AJAX when needed.
This improves the general performance of the admin interface for large sites.
Updates to tag fields are now properly committed to the database when publishing directly from the page edit interface.
Urlconf entries for
/admin/embeds/ etc need to be removed¶
If you created a Wagtail project prior to the release of Wagtail 0.3, it is likely to contain the following entries in its
# TODO: some way of getting wagtailimages to register itself within wagtailadmin so that we
# don't have to define it separately here
These entries (and the corresponding
from wagtail.wagtail* import ... lines) need to be removed from
urls.py. (The entry for
/admin/ should be left in, however.)
Since Wagtail 0.3, the wagtailadmin module automatically takes care of registering these URL subpaths, so these entries are redundant, and these urlconf modules are not guaranteed to remain stable and backwards-compatible in future. Leaving these entries in place will now cause an
ImproperlyConfigured exception to be thrown.
New fields on Image and Rendition models¶
Several new fields have been added to the Image and Rendition models to support Feature Detection. These will be added to the database when you run
./manage.py migrate. If you have defined a custom image model (by extending the
wagtailimages.AbstractRendition classes and specifying
WAGTAILIMAGES_IMAGE_MODEL in settings), the change needs to be applied to that model’s database table too. Running the command:
$ ./manage.py schemamigration myapp --auto add_image_focal_point_fields
(with ‘myapp’ replaced with your app name) will generate the necessary migration file.
South upgraded to 1.0¶
In preparation for Django 1.7 support in a future release, Wagtail now depends on South 1.0, and its migration files have been moved from
south_migrations. Older versions of South will fail to find the migrations in the new location.
If your project’s requirements file (most commonly requirements.txt or requirements/base.txt) references a specific older version of South, this must be updated to South 1.0.