A test for site_branding tag starts to fail with Django 4.0.
It seems to happen as settings.SITE_BRANDING is _("Horizon") and
a translation marker _() is no longer evaluated during rendering.
As a solution, this commit changes the implementation of
site_branding tag to use "simple_tag" method
as django.template.Library.simple_tag() [1] seems to handle
an i18n-ed string properly.
Reviewed: https:/ /review. opendev. org/c/openstack /horizon/ +/851262 /opendev. org/openstack/ horizon/ commit/ b893bcdee32a640 f148e1682485da8 49f0058f31
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit b893bcdee32a640 f148e1682485da8 49f0058f31
Author: Akihiro Motoki <email address hidden>
Date: Thu Jul 28 04:29:58 2022 +0900
Make site_branding tag work with Django 4.0
A test for site_branding tag starts to fail with Django 4.0. SITE_BRANDING is _("Horizon") and
It seems to happen as settings.
a translation marker _() is no longer evaluated during rendering.
As a solution, this commit changes the implementation of template. Library. simple_ tag() [1] seems to handle
site_branding tag to use "simple_tag" method
as django.
an i18n-ed string properly.
[1] https:/ /docs.djangopro ject.com/ en/4.0/ howto/custom- template- tags/#simple- tags
Closes-Bug: #1980214 5da21289d37722e 3f068e27fea
Change-Id: I6fdfffbeef2b40