Spaces:
Build error
Build error
File size: 440 Bytes
b59b500 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # from django import forms
# from django.core.exceptions import ValidationError
# class DocForm(forms.Form):
# file = forms.FileField(
# widget=forms.FileInput(attrs={'class': 'form-control-file'}),
# label=''
# )
# def clean_file(self):
# file = self.cleaned_data.get('file', False)
# if not file:
# raise forms.ValidationError("Please upload a file.")
# return file
|