diff --git a/lostplaces/lostplaces_app/forms.py b/lostplaces/lostplaces_app/forms.py index b0306c9..38120ed 100644 --- a/lostplaces/lostplaces_app/forms.py +++ b/lostplaces/lostplaces_app/forms.py @@ -25,5 +25,10 @@ class PlaceImageCreateForm(forms.ModelForm): fields = '__all__' exclude = ['submitted_by', 'place', 'description'] widgets = { - 'filename': forms.ClearableFileInput(attrs={'multiple': True}) - } + 'filename': forms.ClearableFileInput(attrs={'multiple': True}), + }, + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + print(self.fields) + self.fields['filename'].required = False