here is my problem i created this form:
class SettingsForm(forms.Form): ... logo = forms.ImageField() ...
The download is great and I managed to display the image, but I canβt snap it to the form. Here is what I did:
data = ... files = {'logo': SimpleUploadedFile('logo.jpg', logo.read())} form = SettingsForm(data=data, files=files)
The logo object is ImageFieldFile . I tested the read method in the shell, this is normal. I have no warnings displaying this page, only "no files selected."
Thank you for your help. Sorry for the format of this post, I'm new to stackoverflow and django.
source share