From: Radek Czajka Date: Thu, 26 Sep 2019 23:18:41 +0000 (+0200) Subject: Make LazyUGettext a Promise so it deconstructs nicely. X-Git-Tag: 0.4.1 X-Git-Url: https://git.mdrn.pl/fnpdjango.git/commitdiff_plain/610dacb44133c2efc65faa379a97eeda64d3581b?ds=sidebyside;hp=c4311d82afc1bb44566c6e612b09c4ecad1af643 Make LazyUGettext a Promise so it deconstructs nicely. --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c73ba6..acbd281 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ This document records all notable changes to fnpdjango. +## 0.4.1 (2019-09-27) + +- Make `utils.settings.LazyUGettextLazy` a `django.utils.functional.Promise` + so it deconstructs nicely. + + ## 0.4 (2019-04-03) - Support for Django up to 2.2. diff --git a/fnpdjango/utils/settings.py b/fnpdjango/utils/settings.py index 43f49ec..1f5ea2d 100644 --- a/fnpdjango/utils/settings.py +++ b/fnpdjango/utils/settings.py @@ -2,6 +2,7 @@ Utilities for global settings. """ from django.utils.encoding import python_2_unicode_compatible +from django.utils.functional import Promise # Use Python3 str. try: @@ -13,7 +14,7 @@ else: @python_2_unicode_compatible -class LazyUGettextLazy(object): +class LazyUGettextLazy(Promise): """You can use it to internationalize strings in settings. Just import this class as gettext. diff --git a/setup.py b/setup.py index c0775b7..f39adff 100755 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ def whole_trees(package_dir, paths): setup( name='fnpdjango', - version='0.4', + version='0.4.1', author='Radek Czajka', author_email='radekczajka@nowoczesnapolska.org.pl', url='',