Update file forms.py
This commit is contained in:
parent
88fd7a1ec0
commit
43168e253a
1 changed files with 2 additions and 3 deletions
|
|
@ -16,6 +16,7 @@ from .models import Gallery, Tag
|
|||
class MultipleFileInput(forms.ClearableFileInput):
|
||||
allow_multiple_selected = True
|
||||
|
||||
|
||||
class MultipleFileField(forms.FileField):
|
||||
allowed_extensions = ['jpg', 'jpeg', 'png', 'gif', 'tiff'] # Specify allowed extensions here
|
||||
|
||||
|
|
@ -53,8 +54,6 @@ class MultipleFileField(forms.FileField):
|
|||
)
|
||||
return cleaned_file
|
||||
|
||||
|
||||
|
||||
class UploadForm(forms.Form):
|
||||
file_field = MultipleFileField(label="")
|
||||
gallery = forms.ModelChoiceField(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue