Hello friends
how can i access uploaded file list (multi file upload) in forms.py ?
In a view i access file list like this :
request.FILES.getlist('files')
but in forms.py i get this error:
Exception Value: 'UploadForm' object has no attribute 'request'
i tried to add request object to my form , but i get error when using this code :
def clean_files(self):
data = self.request.FILES
this is the error:
Exception Value: 'NoneType' object has no attribute 'FILES'
i want it for form validation
any help is really appreciated