1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #27386 -- Wrapped admin's readonly fields in <div> rather than <p>.

This commit is contained in:
Jacob Rief
2016-11-05 12:47:12 +01:00
committed by Tim Graham
parent a17fe73d2d
commit b3162cab94
5 changed files with 24 additions and 12 deletions

View File

@@ -419,8 +419,8 @@ class AdminFileWidgetTests(TestDataMixin, TestCase):
response = self.client.get(reverse('admin:admin_widgets_album_change', args=(self.album.id,)))
self.assertContains(
response,
'<p><a href="%(STORAGE_URL)salbums/hybrid_theory.jpg">'
r'albums\hybrid_theory.jpg</a></p>' % {'STORAGE_URL': default_storage.url('')},
'<div class="readonly"><a href="%(STORAGE_URL)salbums/hybrid_theory.jpg">'
r'albums\hybrid_theory.jpg</a></div>' % {'STORAGE_URL': default_storage.url('')},
html=True,
)
self.assertNotContains(
@@ -431,7 +431,7 @@ class AdminFileWidgetTests(TestDataMixin, TestCase):
response = self.client.get(reverse('admin:admin_widgets_album_add'))
self.assertContains(
response,
'<p></p>',
'<div class="readonly"></div>',
html=True,
)