From 610dacb44133c2efc65faa379a97eeda64d3581b Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 27 Sep 2019 01:18:41 +0200 Subject: [PATCH 1/1] Make LazyUGettext a Promise so it deconstructs nicely. --- CHANGELOG.md | 6 ++++++ fnpdjango/utils/settings.py | 3 ++- setup.py | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) 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='', -- 2.20.1