horizon/horizon
Akihiro Motoki b893bcdee3 Make site_branding tag work with Django 4.0
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.

[1] https://docs.djangoproject.com/en/4.0/howto/custom-template-tags/#simple-tags

Closes-Bug: #1980214
Change-Id: I6fdfffbeef2b405da21289d37722e3f068e27fea
2023-10-16 08:40:20 +00:00
..
browsers Address RemovedInDjango40Warning (2) 2022-02-04 16:22:07 +09:00
conf Replace remaining usage of ugettext_lazy 2022-03-23 21:40:31 +09:00
contrib Rename zh-cn and zh-tw translations to zh-hans and zh-hant 2021-02-18 09:57:27 +09:00
forms Address RemovedInDjango40Warning (7) 2022-02-04 16:27:32 +09:00
hacking flake8: Ensure local check in hacking 2.0.0 2020-01-27 02:43:48 +09:00
locale Imported Translations from Zanata 2023-09-26 04:07:39 +00:00
management Merge "Rename zh-cn and zh-tw translations to zh-hans and zh-hant" 2021-03-04 08:08:14 +00:00
middleware Merge "Address RemovedInDjango40Warning (7)" 2022-03-12 22:02:49 +00:00
static Merge "Fix deprecated use of 'jQuery.fn.focus()' shorthand event" 2023-05-09 20:12:25 +00:00
tables Address RemovedInDjango40Warning (7) 2022-02-04 16:27:32 +09:00
tabs Address RemovedInDjango40Warning (7) 2022-02-04 16:27:32 +09:00
templates Add TOTP support 2023-08-18 12:02:25 +00:00
templatetags Make site_branding tag work with Django 4.0 2023-10-16 08:40:20 +00:00
test Fix test failures with Django 4.x 2023-09-13 08:40:51 -04:00
utils Address RemovedInDjango40Warning (7) 2022-02-04 16:27:32 +09:00
workflows Address RemovedInDjango40Warning (7) 2022-02-04 16:27:32 +09:00
__init__.py Revert "Enable to refresh ngdetails view" 2017-08-02 18:31:22 +00:00
base.py Address RemovedInDjango40Warning (3) 2022-02-04 16:26:54 +09:00
cache.py Fix django-compress caching issues 2020-06-15 17:33:16 +03:00
context_processors.py Remove extraneous vim configuration comments 2014-05-06 15:30:10 +08:00
decorators.py Address RemovedInDjango40Warning (2) 2022-02-04 16:22:07 +09:00
defaults.py Merge "Create Horizon session control logic" 2022-03-03 18:57:00 +00:00
exceptions.py Address RemovedInDjango40Warning (2) 2022-02-04 16:22:07 +09:00
karma.conf.js Add expectations to identity specs 2020-12-18 10:22:57 -06:00
loaders.py pylint: fix several coding convention violations 2019-01-17 00:05:27 +09:00
messages.py Address RemovedInDjango40Warning (7) 2022-02-04 16:27:32 +09:00
notifications.py Address RemovedInDjango40Warning (2) 2022-02-04 16:22:07 +09:00
site_urls.py Address RemovedInDjango40Warning (3) 2022-02-04 16:26:54 +09:00
themes.py Define default settings explicitly (horizon) 2019-09-12 15:05:56 +09:00
version.py Remove extraneous vim configuration comments 2014-05-06 15:30:10 +08:00
views.py Address RemovedInDjango40Warning (1) 2022-01-31 22:42:41 +09:00