Binding Files to Forms in Django
问题 I'm trying to create a form where users can save their progress. I have successfully managed to upload files when they are saved, but for some reason the following code leaves the file that was uploaded unbound from the form and thus making the user reupload the file: class ImageForm(forms.ModelForm): class Meta: model = MyImage imageform = ImageForm(instance=a_MyImage_instance) I suppose I could go some manual getting and setting a la the documentation, but this behavior seems a bit odd to