diff --git a/django/contrib/admin/templates/admin/edit_inline/tabular.html b/django/contrib/admin/templates/admin/edit_inline/tabular.html index 71b097e9d9e..b891a76a72b 100644 --- a/django/contrib/admin/templates/admin/edit_inline/tabular.html +++ b/django/contrib/admin/templates/admin/edit_inline/tabular.html @@ -44,7 +44,7 @@ {% for fieldset in inline_admin_form %} {% for line in fieldset %} {% for field in line %} -
{{ field.contents }}
{% else %} diff --git a/django/contrib/admin/templates/admin/includes/fieldset.html b/django/contrib/admin/templates/admin/includes/fieldset.html index 6363aeeee4f..0b71d501f9a 100644 --- a/django/contrib/admin/templates/admin/includes/fieldset.html +++ b/django/contrib/admin/templates/admin/includes/fieldset.html @@ -4,7 +4,7 @@', 3) self.assertContains(response, '
Some help text for the title (with unicode ŠĐĆŽćžšđ)
') self.assertContains(response, 'Some help text for the content (with unicode ŠĐĆŽćžšđ)
') @@ -2983,6 +2983,33 @@ class GroupAdminTest(TestCase): self.assertEqual(response.status_code, 200) +class CSSTest(TestCase): + urls = "regressiontests.admin_views.urls" + fixtures = ['admin-views-users.xml'] + + def setUp(self): + self.client.login(username='super', password='secret') + + def tearDown(self): + self.client.logout() + + def test_css_classes(self): + response = self.client.get('/test_admin/admin/admin_views/post/add/') + + # The main form + self.assertContains(response, 'class="form-row field-title"') + self.assertContains(response, 'class="form-row field-content"') + self.assertContains(response, 'class="form-row field-public"') + self.assertContains(response, 'class="form-row field-awesomeness_level"') + self.assertContains(response, 'class="form-row field-coolness"') + self.assertContains(response, 'class="form-row field-value"') + self.assertContains(response, 'class="form-row"') # The lambda function + + # The tabular inline + self.assertContains(response, '