From 14f38161c42e111db991ed3f3bb5e56addaa8d3e Mon Sep 17 00:00:00 2001 From: Andy Babic Date: Fri, 27 Oct 2017 23:26:09 +0100 Subject: [PATCH] Prep for v2.4.3 --- CHANGELOG.md | 2 +- docs/source/releases/2.4.2.rst | 4 +--- docs/source/releases/2.4.3.rst | 7 +++++++ docs/source/releases/index.rst | 1 + wagtailmenus/__init__.py | 2 +- wagtailmenus/models/menus.py | 13 ++++++++----- 6 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 docs/source/releases/2.4.3.rst diff --git a/CHANGELOG.md b/CHANGELOG.md index db48c5562..bfd206534 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ Changelog ========= -2.4.2 (27.10.2017) +2.4.3 (27.10.2017) ------------------ * Fixed a bug that was causing Django to create new migrations for wagtailmenus diff --git a/docs/source/releases/2.4.2.rst b/docs/source/releases/2.4.2.rst index 2ddff72bc..37698d918 100644 --- a/docs/source/releases/2.4.2.rst +++ b/docs/source/releases/2.4.2.rst @@ -2,6 +2,4 @@ Wagtailmenus 2.4.2 release notes ================================ -This is a maintenence release to fix a bug that was resulting in Django creating additional migrations for the app when running the ``makemigrations`` command after changing the project's default language to something other than "en". - -Thanks to @philippbosch from A Color Bright for submitting the fix. +There are no changes in this release. diff --git a/docs/source/releases/2.4.3.rst b/docs/source/releases/2.4.3.rst new file mode 100644 index 000000000..d9df51612 --- /dev/null +++ b/docs/source/releases/2.4.3.rst @@ -0,0 +1,7 @@ +================================ +Wagtailmenus 2.4.3 release notes +================================ + +This is a maintenence release to fix a bug that was resulting in Django creating additional migrations for the app when running the ``makemigrations`` command after changing the project's default language to something other than "en". + +Thanks to @philippbosch from A Color Bright for submitting the fix. diff --git a/docs/source/releases/index.rst b/docs/source/releases/index.rst index 422d27c8b..dd221fc17 100644 --- a/docs/source/releases/index.rst +++ b/docs/source/releases/index.rst @@ -5,6 +5,7 @@ Release notes .. toctree:: :maxdepth: 1 + 2.4.3 2.4.2 2.4.1 2.4.0 diff --git a/wagtailmenus/__init__.py b/wagtailmenus/__init__.py index 2492f6aa8..a11976efc 100644 --- a/wagtailmenus/__init__.py +++ b/wagtailmenus/__init__.py @@ -3,7 +3,7 @@ # major.minor.patch.release.number # release must be one of alpha, beta, rc, or final -VERSION = (2, 4, 2, 'final', 0) +VERSION = (2, 4, 3, 'final', 0) __version__ = get_version(VERSION) stable_branch_name = get_stable_branch_name(VERSION) diff --git a/wagtailmenus/models/menus.py b/wagtailmenus/models/menus.py index 85b22bba1..984de8111 100644 --- a/wagtailmenus/models/menus.py +++ b/wagtailmenus/models/menus.py @@ -4,8 +4,9 @@ from django.db import models from django.core.exceptions import ImproperlyConfigured, ValidationError +from django.utils import six from django.utils.encoding import python_2_unicode_compatible -from django.utils.functional import cached_property +from django.utils.functional import cached_property, lazy from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ @@ -18,6 +19,8 @@ from .. import app_settings from ..forms import FlatMenuAdminForm +mark_safe_lazy = lazy(mark_safe, six.text_type) + # ######################################################## # Base classes @@ -235,7 +238,7 @@ class AbstractMainMenu(MenuWithMenuItems): verbose_name=_('maximum levels'), choices=app_settings.MAX_LEVELS_CHOICES, default=2, - help_text=mark_safe(_( + help_text=mark_safe_lazy(_( "The maximum number of levels to display when rendering this " "menu. The value can be overidden by supplying a different " "max_levels value to the {% main_menu %}" @@ -246,7 +249,7 @@ class AbstractMainMenu(MenuWithMenuItems): verbose_name=_('specific page usage'), choices=app_settings.USE_SPECIFIC_CHOICES, default=app_settings.USE_SPECIFIC_AUTO, - help_text=mark_safe(_( + help_text=mark_safe_lazy(_( "Controls how 'specific' pages objects are fetched and used when " "rendering this menu. This value can be overidden by supplying a " "different use_specific value to the " @@ -329,7 +332,7 @@ class AbstractFlatMenu(MenuWithMenuItems): verbose_name=_('maximum levels'), choices=app_settings.MAX_LEVELS_CHOICES, default=1, - help_text=mark_safe(_( + help_text=mark_safe_lazy(_( "The maximum number of levels to display when rendering this " "menu. The value can be overidden by supplying a different " "max_levels value to the {% flat_menu %}" @@ -340,7 +343,7 @@ class AbstractFlatMenu(MenuWithMenuItems): verbose_name=_('specific page usage'), choices=app_settings.USE_SPECIFIC_CHOICES, default=app_settings.USE_SPECIFIC_AUTO, - help_text=mark_safe(_( + help_text=mark_safe_lazy(_( "Controls how 'specific' pages objects are fetched and used when " "rendering this menu. This value can be overidden by supplying a " "different use_specific value to the "