mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #13004: Ensure the add page for a model with a ManyToManyField specified
in readonly_fields does not raise an exception. Thanks hejsan, mlavin, copelco. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12827 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -1986,6 +1986,11 @@ class ReadonlyTest(TestCase):
|
||||
p = Post.objects.order_by('-id')[0]
|
||||
self.assertEqual(p.posted, datetime.date.today())
|
||||
|
||||
def test_readonly_manytomany(self):
|
||||
"Regression test for #13004"
|
||||
response = self.client.get('/test_admin/admin/admin_views/pizza/add/')
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
class IncompleteFormTest(TestCase):
|
||||
"""
|
||||
Tests validation of a ModelForm that doesn't explicitly have all data
|
||||
|
||||
Reference in New Issue
Block a user