diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-01-31 18:11:11 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-02-19 14:45:56 +0100 |
commit | 9a6812367df13b1a2fa90bd65149f7998f3651c9 (patch) | |
tree | 69b96697c6e527ca22ba88bf7cb9062be4d52f03 /ishtar_common/migrations | |
parent | 41558e93b75c73f59ad35fd2abedc22d3e389029 (diff) | |
download | Ishtar-9a6812367df13b1a2fa90bd65149f7998f3651c9.tar.bz2 Ishtar-9a6812367df13b1a2fa90bd65149f7998f3651c9.zip |
🐛 fix no translations for homepage on new instances (refs #6136)
Diffstat (limited to 'ishtar_common/migrations')
-rw-r--r-- | ishtar_common/migrations/0251_data_default_welcome.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ishtar_common/migrations/0251_data_default_welcome.py b/ishtar_common/migrations/0251_data_default_welcome.py index df1f10a5e..cf7723de1 100644 --- a/ishtar_common/migrations/0251_data_default_welcome.py +++ b/ishtar_common/migrations/0251_data_default_welcome.py @@ -2,17 +2,18 @@ from django.conf import settings from django.db import migrations -from django.template import Context, Template +from django.template import loader from django.utils import translation -from ishtar_common.utils_migrations import HOMEPAGE_DEFAULT, HOMEPAGE_TITLE +from ishtar_common.utils_migrations import HOMEPAGE_TITLE def default_welcome(apps, __): IshtarSiteProfile = apps.get_model("ishtar_common", "IshtarSiteProfile") old_language = translation.get_language() translation.activate(settings.LANGUAGE_CODE) - homepage = Template(HOMEPAGE_DEFAULT).render(Context({}, use_l10n=True)) + + homepage = loader.render_to_string("ishtar/homepage_default.html") title = str(HOMEPAGE_TITLE) translation.activate(old_language) for profile in IshtarSiteProfile.objects.all(): @@ -27,7 +28,6 @@ def default_welcome(apps, __): profile.save() - class Migration(migrations.Migration): dependencies = [ |