1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #13038 -- Ensured that readonly fields in the admin have their name added as a CSS class. Thanks to andybak for the report, and javimansilla, fisadev and fgallina for their work on the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12922 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee
2010-04-05 15:37:43 +00:00
parent 653b27dcf2
commit 90d112785b
3 changed files with 18 additions and 8 deletions

View File

@@ -1967,6 +1967,11 @@ class ReadonlyTest(TestCase):
formats.localize(datetime.date.today() - datetime.timedelta(days=7))
)
self.assertContains(response, '<div class="form-row coolness">')
self.assertContains(response, '<div class="form-row awesomeness_level">')
self.assertContains(response, '<div class="form-row posted">')
self.assertContains(response, '<div class="form-row ">')
p = Post.objects.create(title="I worked on readonly_fields", content="Its good stuff")
response = self.client.get('/test_admin/admin/admin_views/post/%d/' % p.pk)
self.assertContains(response, "%d amount of cool" % p.pk)