mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #9863. A ForeignKey with editable=False to the parent in an inline no longer raises an exception. Thanks to keithb for the test case and Alex Gaynor for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10239 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -946,3 +946,20 @@ class AdminActionsTest(TestCase):
|
||||
}
|
||||
response = self.client.post('/test_admin/admin/admin_views/externalsubscriber/', action_data)
|
||||
self.failUnlessEqual(response.status_code, 302)
|
||||
|
||||
class TestInlineNotEditable(TestCase):
|
||||
fixtures = ['admin-views-users.xml']
|
||||
|
||||
def setUp(self):
|
||||
result = self.client.login(username='super', password='secret')
|
||||
self.failUnlessEqual(result, True)
|
||||
|
||||
def tearDown(self):
|
||||
self.client.logout()
|
||||
|
||||
def test(self):
|
||||
"""
|
||||
InlineModelAdmin broken?
|
||||
"""
|
||||
response = self.client.get('/test_admin/admin/admin_views/parent/add/')
|
||||
self.failUnlessEqual(response.status_code, 200)
|
||||
|
||||
Reference in New Issue
Block a user