diff options
author | Akihiro Motoki <amotoki@gmail.com> | 2022-01-26 22:40:11 +0900 |
---|---|---|
committer | Akihiro Motoki <amotoki@gmail.com> | 2022-01-31 22:42:41 +0900 |
commit | a9d5273f3ca91c8568959c79606332513608ec84 (patch) | |
tree | 82ee31308d530e033bcf83ef0ea916390eacd679 /openstack_dashboard/utils | |
parent | 047b81e979e3ec96bd52a9e306eea8c985bcad7c (diff) | |
download | horizon-a9d5273f3ca91c8568959c79606332513608ec84.tar.gz |
Address RemovedInDjango40Warning (1)
force_text() is deprecated in favor of force_str()
smart_text() is deprecated in favor of smart_str()
https://docs.djangoproject.com/en/4.0/releases/3.0/#django-utils-encoding-force-text-and-smart-text
Change-Id: Ic462fa8c3dfa26e8196df19fef5044036a9e97b4
Diffstat (limited to 'openstack_dashboard/utils')
-rw-r--r-- | openstack_dashboard/utils/config_types.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openstack_dashboard/utils/config_types.py b/openstack_dashboard/utils/config_types.py index 5eae5760a..74a2d20cd 100644 --- a/openstack_dashboard/utils/config_types.py +++ b/openstack_dashboard/utils/config_types.py @@ -93,7 +93,7 @@ class Translate(types.ConfigType): def _formatter(self, value): return self.quote_trailing_and_leading_space( - encoding.force_text(value)) + encoding.force_str(value)) class Literal(types.ConfigType): @@ -181,7 +181,7 @@ class Literal(types.ConfigType): return '(%s)' % ', '.join(self._format(value) for value in result) if isinstance(result, functional.Promise): # Lazy translatable string. - return repr(encoding.force_text(result)) + return repr(encoding.force_str(result)) return repr(result) def _formatter(self, value): |