mirror of
https://github.com/django/django.git
synced 2025-08-01 17:42:56 +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:
parent
a7bc1aea03
commit
ffb72a95bc
4 changed files with 35 additions and 6 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue