wagtail/docs/releases/0.5.rst

114 wiersze
4.1 KiB
ReStructuredText
Czysty Zwykły widok Historia

2014-07-10 16:24:42 +00:00
==========================================
Wagtail 0.5 release notes - IN DEVELOPMENT
==========================================
2014-07-10 16:08:54 +00:00
2014-07-10 16:21:42 +00:00
.. contents::
2014-07-10 16:11:23 +00:00
:local:
2014-07-10 16:21:42 +00:00
:depth: 1
2014-07-10 16:11:23 +00:00
What's new
==========
2014-07-10 16:08:54 +00:00
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 <http://opencv.org/>`_, and use this to intelligently crop images.
:ref:`image_feature_detection`
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.
:ref:`using_images_outside_wagtail`
RoutablePage
~~~~~~~~~~~~
A ``RoutablePage`` model has been added to allow embedding Django-style URL routing within a page.
:ref:`routable_page`
2014-07-10 16:08:54 +00:00
Minor features
~~~~~~~~~~~~~~
Core
----
* Hooks can now be defined using decorator syntax:
.. code-block:: python
@hooks.register('construct_main_menu')
def construct_main_menu(request, menu_items):
menu_items.append(
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.
* A ``page_unpublished`` signal has been added.
2014-07-10 16:08:54 +00:00
Admin
-----
* Explorer nav now rendered separately and fetched with AJAX when needed.
2014-07-18 15:58:38 +00:00
This improves the general performance of the admin interface for large sites.
2014-07-10 16:08:54 +00:00
Bug fixes
~~~~~~~~~
2014-07-24 10:33:58 +00:00
* Updates to tag fields are now properly committed to the database when publishing directly from the page edit interface.
2014-07-10 16:08:54 +00:00
Upgrade considerations
======================
Urlconf entries for ``/admin/images/``, ``/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 ``urls.py``:
.. code-block:: python
# TODO: some way of getting wagtailimages to register itself within wagtailadmin so that we
# don't have to define it separately here
url(r'^admin/images/', include(wagtailimages_urls)),
url(r'^admin/embeds/', include(wagtailembeds_urls)),
url(r'^admin/documents/', include(wagtaildocs_admin_urls)),
url(r'^admin/snippets/', include(wagtailsnippets_urls)),
url(r'^admin/search/', include(wagtailsearch_admin_urls)),
url(r'^admin/users/', include(wagtailusers_urls)),
url(r'^admin/redirects/', include(wagtailredirects_urls)),
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 :ref:`image_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.AbstractImage`` and ``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::
2014-07-31 08:17:52 +00:00
./manage.py schemamigration myapp --auto add_image_focal_point_fields
(with 'myapp' replaced with your app name) will generate the necessary migration file.
2014-07-10 16:08:54 +00:00
Deprecated features
===================