X-Git-Url: https://git.mdrn.pl/fnpdjango.git/blobdiff_plain/610dacb44133c2efc65faa379a97eeda64d3581b..ed6dc99049d714b5b9828e3869574b066892951d:/fnpdjango/utils/settings.py?ds=sidebyside diff --git a/fnpdjango/utils/settings.py b/fnpdjango/utils/settings.py index 1f5ea2d..b6df2b3 100644 --- a/fnpdjango/utils/settings.py +++ b/fnpdjango/utils/settings.py @@ -1,19 +1,9 @@ """ Utilities for global settings. """ -from django.utils.encoding import python_2_unicode_compatible from django.utils.functional import Promise -# Use Python3 str. -try: - unicode -except NameError: - pass -else: - str = unicode - -@python_2_unicode_compatible class LazyUGettextLazy(Promise): """You can use it to internationalize strings in settings. @@ -27,8 +17,8 @@ class LazyUGettextLazy(Promise): def __str__(self): if not self.real: - from django.utils.translation import ugettext_lazy - LazyUGettextLazy._ = staticmethod(ugettext_lazy) + from django.utils.translation import gettext_lazy + LazyUGettextLazy._ = staticmethod(gettext_lazy) LazyUGettextLazy.real = True return str(self._(self.text))