1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

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.
This commit is contained in:
Sarah Boyce
2024-10-30 09:27:57 +01:00
parent 0eaaadd47f
commit 2c029c718f
5 changed files with 23 additions and 8 deletions

View File

@@ -1801,7 +1801,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,
@@ -1846,7 +1846,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}" '