Open nikolaysm opened 6 years ago
Could be solved by adding below function in "DropFileWidget"
def value_from_datadict(self, data, files, name):
"""
Given a dictionary of data and this widget's name, return the value
of this widget or None if it's not provided.
"""
tmp = data.get(name)
if tmp and len(tmp) == 1:
tmp = tmp.get('current_file')
return tmp
Hello, I am using django 1.11.
When i do update object with Ajax i get error for ImageField.
That is "FileExtensionValidator" from django who expects an object for validation but a unicode is given.
Thanks for replying Full Traceback