From 0662f915ad2c052a137c57b05c2600039ed0f93f Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Thu, 28 May 2015 15:03:48 +0100 Subject: [PATCH] Reordered 1.0 upgrade considerations --- docs/releases/1.0.rst | 63 +++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/docs/releases/1.0.rst b/docs/releases/1.0.rst index d5a5614ea..7f1157d9f 100644 --- a/docs/releases/1.0.rst +++ b/docs/releases/1.0.rst @@ -146,10 +146,40 @@ This release drops support for Django 1.6, Python 2.6/3.2 and Elasticsearch 0.90 If you are upgrading from Elasticsearch 0.90.x, you may also need to update the ``elasticsearch`` pip package to a version greater than ``1.0`` as well. +``InlinePanel`` definitions no longer need to specify the base model +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In previous versions of Wagtail, inline child blocks on a page or snippet were defined using a declaration like:: + + InlinePanel(HomePage, 'carousel_items', label="Carousel items") + +It is no longer necessary to pass the base model as a parameter, so this declaration should be changed to:: + + InlinePanel('carousel_items', label="Carousel items") + +The old format is now deprecated; all existing ``InlinePanel`` declarations should be updated to the new format. + +You no longer need ``LOGIN_URL`` and ``LOGIN_REDIRECT_URL`` to point to Wagtail admin. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you are upgrading from an older version of Wagtail, you probably want to remove these from your project settings. + +Prevously, these two settings needed to be set to ``wagtailadmin_login`` and ``wagtailadmin_dashboard`` +respectively or Wagtail would become very tricky to log in to. This is no longer the case and Wagtail +should work fine without them. + +``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. + Upgrading from the external ``wagtailapi`` module. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you were previously using the external ``wagtailapi`` module, it is important to note these two backwards-incompatible changes. +If you were previously using the external ``wagtailapi`` module (which has now become ``wagtail.contrib.wagtailapi``). Please be aware of the following backwards-incompatible changes: + **1. Representation of foreign keys has changed** @@ -203,28 +233,6 @@ keys are represented applies to this field too:: ... } - - -``InlinePanel`` definitions no longer need to specify the base model -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In previous versions of Wagtail, inline child blocks on a page or snippet were defined using a declaration like:: - - InlinePanel(HomePage, 'carousel_items', label="Carousel items") - -It is no longer necessary to pass the base model as a parameter, so this declaration should be changed to:: - - InlinePanel('carousel_items', label="Carousel items") - -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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -236,15 +244,6 @@ functionality has now been removed. If you would like to keep using Celery for sending notification emails, have a look at: `django-celery-email `_ -You no longer need ``LOGIN_URL`` and ``LOGIN_REDIRECT_URL`` to point to Wagtail admin. -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If you are upgrading from an older version of Wagtail, you probably want to remove these from your project settings. - -Prevously, these two settings needed to be set to ``wagtailadmin_login`` and ``wagtailadmin_dashboard`` -respectively or Wagtail would become very tricky to log in to. This is no longer the case and Wagtail -should work fine without them. - Login/Password reset views renamed ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~