mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
[1.0.X] 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. Backport of r10239 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10287 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -819,3 +819,20 @@ class AdminInheritedInlinesTest(TestCase):
|
||||
self.failUnlessEqual(FooAccount.objects.all()[0].username, "%s-1" % foo_user)
|
||||
self.failUnlessEqual(BarAccount.objects.all()[0].username, "%s-1" % bar_user)
|
||||
self.failUnlessEqual(Persona.objects.all()[0].accounts.count(), 2)
|
||||
|
||||
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