1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[5.1.x] Fixed #35876 -- Displayed non-ASCII fieldset names when rendering ModelAdmin.fieldsets.

Thank you to Namhong Kim for the report, and to Mariusz Felisiak and Marijke Luttekes for the review.

Regression in 01ed59f753.

Backport of 2c029c718f from main.
This commit is contained in:
Sarah Boyce
2024-10-30 09:27:57 +01:00
parent 5045dab4f9
commit 9fa2d235c9
5 changed files with 23 additions and 8 deletions

View File

@@ -1785,7 +1785,7 @@ class TestInlineWithFieldsets(TestDataMixin, TestCase):
# The second and third have the same "Advanced options" name, but the
# second one has the "collapse" class.
for x, classes in ((1, ""), (2, "collapse")):
heading_id = f"fieldset-0-advanced-options-{x}-heading"
heading_id = f"fieldset-0-{x}-heading"
with self.subTest(heading_id=heading_id):
self.assertContains(
response,
@@ -1830,7 +1830,7 @@ class TestInlineWithFieldsets(TestDataMixin, TestCase):
# Every fieldset defined for an inline's form.
for z, fieldset in enumerate(inline_admin_form):
if fieldset.name:
heading_id = f"{prefix}-{y}-details-{z}-heading"
heading_id = f"{prefix}-{y}-{z}-heading"
self.assertContains(
response,
f'<fieldset class="module aligned {fieldset.classes}" '