diff --git a/CHANGELOG.txt b/CHANGELOG.txt index da5ff435ae..d012042cf7 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -44,6 +44,7 @@ Changelog * Added "Add child page" button to admin userbar (Eric Drechsel) * Renamed the `construct_wagtail_edit_bird` hook to `construct_wagtail_userbar` * 'static' template tags are now used throughout the admin templates, in place of STATIC_URL + * Added a new decorator-based syntax for RoutablePage, compatible with Django 1.8 0.8.7 (xx.xx.2015) diff --git a/docs/releases/1.0.rst b/docs/releases/1.0.rst index ca5cd3d14c..033f92e1b9 100644 --- a/docs/releases/1.0.rst +++ b/docs/releases/1.0.rst @@ -106,6 +106,12 @@ Search * Search view accepts "page" GET parameter in line with pagination +Routable pages +-------------- + + * Added a new decorator-based syntax for RoutablePage, compatible with Django 1.8 + + Bug fixes ~~~~~~~~~ @@ -195,6 +201,13 @@ It is no longer necessary to pass the base model as a parameter, so this declara The old format is now deprecated; all existing ``InlinePanel`` declarations should be updated to the new format. +``RoutablePage`` now uses decorator syntax for defining views +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In previous versions of Wagtail, ``RoutablePage`` models were configured by setting a ``subpage_urls`` attribute within the page model. This fails in Django 1.8, because it relies on passing the view function name as a string which is not an absolute module path. To address this, Wagtail 1.0 introduces a new syntax where each view function is annotated with a ``@route`` decorator - see :ref:`routable_page_mixin`. + +The old ``subpage_urls`` convention will continue to work on Django versions prior to 1.8, but this is now deprecated; all existing ``RoutablePage`` definitions should be updated to the decorator-based convention. + Celery no longer automatically used for sending notification emails ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~