PlaceImageForm Filename required
This commit is contained in:
parent
bf0d20dbbd
commit
fc4167ffc2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user