From ba4440e214db8c11e09a4e1db1d59d07cdac77b9 Mon Sep 17 00:00:00 2001 From: Johannes Maron Date: Tue, 6 Jun 2023 10:36:25 +0200 Subject: [PATCH] Address Django security patch in test suite See also: https://code.djangoproject.com/ticket/31710 --- tests/testapp/forms.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/testapp/forms.py b/tests/testapp/forms.py index 6617e89..bd2e195 100644 --- a/tests/testapp/forms.py +++ b/tests/testapp/forms.py @@ -10,10 +10,14 @@ ) + forms.ClearableFileInput.__bases__ +class MultipleFileInput(forms.ClearableFileInput): + allow_multiple_selected = True + + class UploadForm(forms.ModelForm): class Meta: model = FileModel fields = ("file", "other_file") widgets = { - "file": forms.ClearableFileInput(attrs={"multiple": True}), + "file": MultipleFileInput(attrs={"multiple": True}), }