def clean_file(self): if self.cleaned_data['file'] and not Task.check_taskfile(self.cleaned_data['file']): raise forms.ValidationError( 'Format not supported' ) return self.cleaned_data['file']
def clean_file(self): if self.cleaned_data['file'] and not Task.check_taskfile( self.cleaned_data['file']): raise forms.ValidationError('Format not supported') return self.cleaned_data['file']