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

@@ -237,6 +237,7 @@ class ArticleAdmin(ArticleAdminWithExtraUrl):
"Some other fields",
{"classes": ("wide",), "fields": ("date", "section", "sub_section")},
),
("이름", {"fields": ("another_section",)}),
)
# These orderings aren't particularly useful but show that expressions can

View File

@@ -2508,6 +2508,19 @@ class AdminViewPermissionsTest(TestCase):
self.assertContains(
response, '<input type="submit" value="Save and view" name="_continue">'
)
self.assertContains(
response,
'<h2 id="fieldset-0-0-heading" class="fieldset-heading">Some fields</h2>',
)
self.assertContains(
response,
'<h2 id="fieldset-0-1-heading" class="fieldset-heading">'
"Some other fields</h2>",
)
self.assertContains(
response,
'<h2 id="fieldset-0-2-heading" class="fieldset-heading">이름</h2>',
)
post = self.client.post(
reverse("admin:admin_views_article_add"), add_dict, follow=False
)