Re: Help with file upload using ModelForm

2010-09-23 Thread Federico Capoano
Sorry ignore this. Changed from: form = PdfForm( initial ={ 'name': pdf.name, 'description': pdf.description, 'file': pdf.file, } ) to: form = PdfForm(instance = pdf) and it works fine. On 23 Set, 17:43, Federico C

Help with file upload using ModelForm

2010-09-23 Thread Federico Capoano
Hello to all, maybe is something really silly, but I don't get it. I'm using ModelForm to edit a database object that has a file input. The tag has enctype="multipart/form-data" and the view uses request.FILES. I can add and edit files without problems, but there is a case in which editing a f