0.5.rst 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. =========================
  2. Wagtail 0.5 release notes
  3. =========================
  4. .. contents::
  5. :local:
  6. :depth: 1
  7. What's new
  8. ==========
  9. Multiple image uploader
  10. ~~~~~~~~~~~~~~~~~~~~~~~
  11. The image uploader UI has been improved to allow multiple images to be uploaded at once.
  12. Image feature detection
  13. ~~~~~~~~~~~~~~~~~~~~~~~
  14. Wagtail can now apply face and feature detection on images using `OpenCV <http://opencv.org/>`_, and use this to intelligently crop images.
  15. :ref:`image_feature_detection`
  16. Using images outside Wagtail
  17. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18. 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.
  19. :ref:`using_images_outside_wagtail`
  20. RoutablePage
  21. ~~~~~~~~~~~~
  22. A ``RoutablePage`` model has been added to allow embedding Django-style URL routing within a page.
  23. :ref:`routable_page_mixin`
  24. Usage stats for images, documents and snippets
  25. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  26. It's now easier to find where a particular image, document or snippet is being used on your site.
  27. Set the ``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.
  28. Copy Page action
  29. ~~~~~~~~~~~~~~~~
  30. The explorer interface now offers the ability to copy pages, with or without subpages.
  31. Minor features
  32. ~~~~~~~~~~~~~~
  33. Core
  34. ----
  35. * Hooks can now be defined using decorator syntax:
  36. .. code-block:: python
  37. @hooks.register('construct_main_menu')
  38. def construct_main_menu(request, menu_items):
  39. menu_items.append(
  40. MenuItem('Kittens!', '/kittens/', classnames='icon icon-folder-inverse', order=1000)
  41. )
  42. * The lxml library (used for whitelisting and rewriting of rich text fields) has been replaced with the pure-python html5lib library, to simplify installation.
  43. * A ``page_unpublished`` signal has been added.
  44. Admin
  45. -----
  46. * Explorer nav now rendered separately and fetched with AJAX when needed.
  47. This improves the general performance of the admin interface for large sites.
  48. Bug fixes
  49. ~~~~~~~~~
  50. * Updates to tag fields are now properly committed to the database when publishing directly from the page edit interface.
  51. Upgrade considerations
  52. ======================
  53. Urlconf entries for ``/admin/images/``, ``/admin/embeds/`` etc need to be removed
  54. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  55. 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``:
  56. .. code-block:: python
  57. # TODO: some way of getting wagtailimages to register itself within wagtailadmin so that we
  58. # don't have to define it separately here
  59. url(r'^admin/images/', include(wagtailimages_urls)),
  60. url(r'^admin/embeds/', include(wagtailembeds_urls)),
  61. url(r'^admin/documents/', include(wagtaildocs_admin_urls)),
  62. url(r'^admin/snippets/', include(wagtailsnippets_urls)),
  63. url(r'^admin/search/', include(wagtailsearch_admin_urls)),
  64. url(r'^admin/users/', include(wagtailusers_urls)),
  65. url(r'^admin/redirects/', include(wagtailredirects_urls)),
  66. 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.)
  67. 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.
  68. New fields on Image and Rendition models
  69. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  70. 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:
  71. .. code-block:: console
  72. $ ./manage.py schemamigration myapp --auto add_image_focal_point_fields
  73. (with 'myapp' replaced with your app name) will generate the necessary migration file.
  74. South upgraded to 1.0
  75. ~~~~~~~~~~~~~~~~~~~~~
  76. 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 ``migrations`` to ``south_migrations``. Older versions of South will fail to find the migrations in the new location.
  77. 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.