mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #33830 -- Fixed VariableDoesNotExist when rendering ClearableFileInput.
This commit is contained in:
committed by
Mariusz Felisiak
parent
6f49b7b69b
commit
9942f3fb49
@@ -110,6 +110,16 @@ class ClearableFileInputTest(WidgetTest):
|
||||
),
|
||||
)
|
||||
|
||||
def test_render_no_disabled(self):
|
||||
class TestForm(Form):
|
||||
clearable_file = FileField(
|
||||
widget=self.widget, initial=FakeFieldFile(), required=False
|
||||
)
|
||||
|
||||
form = TestForm()
|
||||
with self.assertNoLogs("django.template", "DEBUG"):
|
||||
form.render()
|
||||
|
||||
def test_render_as_subwidget(self):
|
||||
"""A ClearableFileInput as a subwidget of MultiWidget."""
|
||||
widget = MultiWidget(widgets=(self.widget,))
|
||||
|
||||
Reference in New Issue
Block a user