mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #29414 -- Restored form inputs on admin inlines when the user doesn't have the change permission.
Regression in 825f0beda8.
This commit is contained in:
committed by
Tim Graham
parent
a7bc1aea03
commit
ffb72a95bc
@@ -447,6 +447,16 @@ class TestInline(TestDataMixin, TestCase):
|
||||
self.assertTrue(response.context['inline_admin_formset'].opts.has_registered_model)
|
||||
self.assertNotContains(response, INLINE_CHANGELINK_HTML)
|
||||
|
||||
def test_noneditable_inline_has_field_inputs(self):
|
||||
"""Inlines without change permission shows field inputs on add form."""
|
||||
response = self.client.get(reverse('admin:admin_inlines_novelreadonlychapter_add'))
|
||||
self.assertContains(
|
||||
response,
|
||||
'<input type="text" name="chapter_set-0-name" '
|
||||
'class="vTextField" maxlength="40" id="id_chapter_set-0-name">',
|
||||
html=True
|
||||
)
|
||||
|
||||
|
||||
@override_settings(ROOT_URLCONF='admin_inlines.urls')
|
||||
class TestInlineMedia(TestDataMixin, TestCase):
|
||||
|
||||
Reference in New Issue
Block a user