Wagtailmenus

Latest version: v4.0.1

Safety actively analyzes 687918 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 8 of 10

2.1.0

------------------

* Added official support for wagtail v1.8.
* Turned `wagtailmenus.app_settings` into a real settings module.
* Added `WAGTAILMENUS_MAIN_MENU_MODEL` and `WAGTAILMENUS_FLAT_MENU_MODEL`
settings to allow the default main and flat menu models to be swapped out for
custom models.
* Added `WAGTAILMENUS_MAIN_MENU_ITEMS_RELATED_NAME` and
`WAGTAILMENUS_FLAT_MENU_ITEMS_RELATED_NAME` settings to allow the default
menu item models to be swapped out for custom models.
* Added the `WAGTAILMENUS_PAGE_FIELD_FOR_MENU_ITEM_TEXT` setting to allow
developers to specify a page attribute other than `title` to be used to
populate the `text` attribute for menu items linking to pages.
* Added german translation by Pierre (bloodywing).
* Split models.py into 3 logically-named files to make models easier to find.

2.0.3

------------------

Fixed migration related issue raised by urlsangel.

2.0.2

------------------

This release is broken and shouldn't be used. Skip to v2.0.3 instead.

2.0.1

------------------

Bug fix for `main_menu` template tag.

2.0.0

------------------

* The `use_specific` menu tag argument can now be one of 4 integer values,
allowing for more fine-grained control over the use of `Page.specific` and
`PageQuerySet.specific()` when rendering menu tags (see README.md for further
details).
* `MainMenu` and `FlatMenu` models now have a `use_specific` field, to allow
the default `use_specific` setting when rendering that menu to be changed
via the admin area.
* `MainMenu` and `FlatMenu` models now have a `max_levels` field, to allow the
default `max_levels` setting when rendering that menu to be changed via the
admin area.
* When rendering a multi-level `MainMenu` or `FlatMenu, the model instances for
those menus pre-fetch all of pages needed to generate the entire menu.
The menu tags then request lists of child pages from menu instance as they
are needed, reducing the need to hit the database at every single branch.
* The `max_levels`, `use_specific`, `parent_page` and `menuitem_or_page`
arguments passed to all template tags are now checked to ensure their values
are valid, and if not, raise a `ValueError` with a helpful message to aid
debugging.
* Developers not using the `MenuPage` class or overriding any of wagtail `Page`
methods involved in URL generation can now enjoy better performance by
choosing not to fetch any specific pages at all during rendering. Simply
pass `use_specific=USE_SPECIFIC_OFF` or `use_specific=0` to the tag, or
update the `use_specific` field value on your `MainMenu` or `FlatMenu`
instances via the Wagtail admin area.
* Dropped support for the `WAGTAILMENUS_DEFAULT_MAIN_MENU_MAX_LEVELS` and
`WAGTAILMENUS_DEFAULT_FLAT_MENU_MAX_LEVELS` settings. Default values are now
set using the `max_levels` field on the menu objects themselves.
* Dropped support for the `WAGTAILMENUS_DEFAULT_MAIN_MENU_USE_SPECIFIC` and
`WAGTAILMENUS_DEFAULT_FLAT_MENU_USE_SPECFIC` settings. Default values are now
set using the `use_specific` field on the menu objects themselves.
* Eliminated a lot of code duplication in template tags by adding the
`get_sub_menu_items_for_page` method, which is used by `sub_menu`,
`section_menu` and `children_menu` to do most of their work.
* The default `show_multiple_levels` value for the `flat_menu` tag is now
`True` instead of `False`. The default `max_levels` field value for
`FlatMenu` instances is `1`, which has the same effect. Only, the value can
be changed via the admin area, and the changes will reflected immediately
without having to explicitly add `show_multiple_levels=True` to the tag in
templates.
* The `has_submenu_items()` method on `MenuPage` no longer accepts a
`check_for_children` argument.
* The `modify_submenu_items()` and `has_submenu_items()` methods on the
`MenuPage` model now both accept an optional `menu_instance` value, so that
menu_instance might be called to access pre-fetched page data without hitting
the database.
* Added the `WAGTAILMENUS_ADD_EDITOR_OVERRIDE_STYLES` setting to allow override
styles to be disabled.
* Other minor performance improvements.

1.6.1

------------------

* French translations added by François GUÉRIN (frague59)

Page 8 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.