mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[5.1.x] Fixed #35716 -- Fixed VariableDoesNotExist when rendering admin fieldsets.
Regression in01ed59f753. Thank you to Fábio Domingues and Marijke Luttekes for the report, and thank you to Natalia Bidart for the review. Backport offd1dd76778from main.
This commit is contained in:
@@ -1768,6 +1768,13 @@ class TestInlineWithFieldsets(TestDataMixin, TestCase):
|
||||
def setUp(self):
|
||||
self.client.force_login(self.superuser)
|
||||
|
||||
@override_settings(DEBUG=True)
|
||||
def test_fieldset_context_fully_set(self):
|
||||
url = reverse("admin:admin_inlines_photographer_add")
|
||||
with self.assertRaisesMessage(AssertionError, "no logs"):
|
||||
with self.assertLogs("django.template", "DEBUG"):
|
||||
self.client.get(url)
|
||||
|
||||
def test_inline_headings(self):
|
||||
response = self.client.get(reverse("admin:admin_inlines_photographer_add"))
|
||||
# Page main title.
|
||||
|
||||
Reference in New Issue
Block a user