diff --git a/docs/source/index.rst b/docs/source/index.rst index 48954359..6cac82b1 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -7,8 +7,8 @@ wagtailmenus is an open-source extension for `Wagtail CMS The current version is tested for compatibility with the following: -- Wagtail versions >= 4.1 -- Django versions 3.2, 4.1, and 4.2 +- Wagtail versions >= 5.2 +- Django versions 3.2, 4.2 and >= 5.0 - Python versions 3.8 to 3.12 To find out more about what wagtailmenus does and why, see :doc:`overview` diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 3a2981ed..555cbacd 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -10,7 +10,7 @@ Installing wagtailmenus pip install wagtailmenus -2. Add ``wagtailmenus`` and ``modeladmin`` to the +2. Add ``wagtailmenus`` to the ``INSTALLED_APPS`` setting in your project settings: .. code-block:: python diff --git a/docs/source/releases/4.0.rst b/docs/source/releases/4.0.rst new file mode 100644 index 00000000..57502ceb --- /dev/null +++ b/docs/source/releases/4.0.rst @@ -0,0 +1,55 @@ +============================== +Wagtailmenus 4.0 release notes +============================== + +.. contents:: + :local: + :depth: 1 + + +What's new? +=========== + +Wagtailmenus now uses Snippets +------------------------------ + +Wagtailmenus prior to this release used the Wagtail ModelAdmin contrib package for menu administration. +With the deprecation of ModelAdmin in Wagtail 5.2 and its removal in Wagtail 6, Wagtail's enhanced Snippet capability is now used for menu admin. + +This release retains all the functionality of wagtailmenus 3.1.9, however the admin user interface has changed consistent with the revised look in Wagtail 5.2 and 6. +Any existing menu configuration is retained. + +Upgrade considerations +====================== + +Migration from ModelAdmin to Snippets +------------------------------------- + +The two menu administration ViewSets, ``MainMenuAdmin`` and ``FlatMenuAdmin``, are now based on ``SnippetViewSet``. + +Ensure wagtail.snippets is in your INSTALLED_APPS: + +.. code-block:: python + + INSTALLED_APPS = [ + ..., + 'wagtail.snippets', + ..., + ] + +If `wagtailmenus` is your code's last dependency on `ModelAdmin`, +then you can remove `wagtail_modeladmin` or `wagtail.contrib.modeladmin` from your `INSTALLED_APPS` and if present, from your `requirements.txt` file. + +Customised Admin Classes +~~~~~~~~~~~~~~~~~~~~~~~~ + +If you have customised either of ``MainMenuAdmin`` and ``FlatMenuAdmin``, +you will need to refactor your code to be compatible with ``SnippetViewSet`` behaviour. +The guide at `Migrating from ModelAdmin to Snippets `_ in the Wagtail documentation may assist with this task. + +You will need to assign the newly customised admin classes to the following settings: + +- ``WAGTAILMENUS_MAIN_MENUS_ADMIN_CLASS``. This replaces ``WAGTAILMENUS_MAIN_MENUS_MODELADMIN_CLASS`` +- ``WAGTAILMENUS_FLAT_MENUS_ADMIN_CLASS``. This replaces ``WAGTAILMENUS_FLAT_MENUS_MODELADMIN_CLASS`` + +Note that ``MainMenuAdmin`` and ``FlatMenuAdmin`` are now in the ``wagtailmenus.menuadmin`` module, and that the ``wagtailmenus.modeladmin`` module has been removed. diff --git a/docs/source/releases/index.rst b/docs/source/releases/index.rst index fc4a101c..0aab9169 100644 --- a/docs/source/releases/index.rst +++ b/docs/source/releases/index.rst @@ -5,6 +5,7 @@ Release notes .. toctree:: :maxdepth: 1 + 4.0 3.1.9 3.1.8 3.1.7