nithin81's picture
initial commit
b59b500
Raw
History Blame Contribute Delete
440 Bytes
# 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