Re: Displaying an uploaded file in a form

2014-06-06 Thread Shawn H
Interestingly, it seems that (at 1.7b4, at least) the widget DOES display the document link if the file is added to the initial data for the form. I missed deleting that portion of the code from last night, and running it this morning django rendered the widget as shown in the image below. In

Re: Displaying an uploaded file in a form

2014-06-06 Thread Shawn H
Ah, OK. The docs don't make that very clear, especially since the normal pattern is that form fields function as display and edit (i.e., you can send initial data to the form). I guess I expected the widget to handle both the upload function and display the link without additional

Re: Displaying an uploaded file in a form

2014-06-05 Thread Tom Evans
On Thu, Jun 5, 2014 at 8:12 PM, Shawn H wrote: > I've been trying to understand how to handle file uploads, and I've got the > upload portion down. I have a FileField in my form, process it in my view, > and it's saved in the correct location as specified in MEDIA_ROOT

Displaying an uploaded file in a form

2014-06-05 Thread Shawn H
I've been trying to understand how to handle file uploads, and I've got the upload portion down. I have a FileField in my form, process it in my view, and it's saved in the correct location as specified in MEDIA_ROOT and the upload_to attribute of the Model. My problem is, when I try to bind