I have gotten it to work finally. In my code above
newform['data_file'] actually outputs html code, not a dictionary.
That was the reason why it was "unsubscriptable".
So instead of saying newform['data_file']['filename'], I requested
form_data['data_file']['filename']. But then django complain
On 5/13/07, jonathan_ou <[EMAIL PROTECTED]> wrote:
>
> I am trying to upload a file using the newforms library. So far from
> reading other posts and googling around it appears I have to copy the
> request.POST dictionary and update it with request.FILES. Then I
> would do a "model.save__file(,
I am trying to upload a file using the newforms library. So far from
reading other posts and googling around it appears I have to copy the
request.POST dictionary and update it with request.FILES. Then I
would do a "model.save__file(, )" to
actually save the file.
Here's the code where I try to
3 matches
Mail list logo