Re: Document direct API usage of FileField and ImageField

2010-09-17 Thread Owen Nelson
Actually, I'm not sure what way to go with this. All the info is there, it's just spread around in a number of topics: http://docs.djangoproject.com/en/dev/ref/files/file/ http://docs.djangoproject.com/en/dev/topics/http/file-uploads/

Re: Document direct API usage of FileField and ImageField

2010-09-17 Thread Owen Nelson
I'd love to pitch in on updating the docs for file handling :) Even though this kind of talk is better suited over on django-users, here's one way to skin a cat. I had a view that displayed a model form (one of the fields was a FileField). I needed to alter the resolution of the uploaded image

Re: Document direct API usage of FileField and ImageField

2010-09-15 Thread Yo-Yo Ma
I actually don't know how to do it myself. I'm still trying to put some context to the Storage API, and file uploads in general. There seems not to be a consensus on the best way to handle files in Django. I figured I'd put the request up here so others don't run into the same problem, but I've

Re: Document direct API usage of FileField and ImageField

2010-09-15 Thread Russell Keith-Magee
On Thu, Sep 16, 2010 at 2:28 AM, Yo-Yo Ma wrote: > I think it might be a good idea to document the direct usage of the > FileField, and ImageField model fields. Sure -- sounds like a reasonable proposal to me. Open a ticket on Trac so the idea isn't forgotten. We also

Re: Document direct API usage of FileField and ImageField

2010-09-15 Thread Yo-Yo Ma
BTW, ignore the PIL imports On Sep 15, 12:28 pm, Yo-Yo Ma wrote: > I think it might be a good idea to document the direct usage of the > FileField, and ImageField model fields. > > The docs make the assumption that everyone is using ModelForm to > upload files. If I

Document direct API usage of FileField and ImageField

2010-09-15 Thread Yo-Yo Ma
I think it might be a good idea to document the direct usage of the FileField, and ImageField model fields. The docs make the assumption that everyone is using ModelForm to upload files. If I have a file on my hard drive and want to use it to populate the field, I would try something like: