Re: FileField and ImageField

2016-03-20 Thread Cristiano Coelho
I agree with you, generate_filename should just call the field upload_to and then delegate the whole name generation to the storage. There's another thing about file storage that is troubling me: https://github.com/django/django/blob/master/django/core/files/storage.py#L57 The docs state you

Re: FileField and ImageField

2016-03-19 Thread Josh Smeaton
It seems like FileField should delegate some of these methods to an underlying Storage backend, no? I don't know what the implications to back-compat would be, but the idea seems like a sensible one to start with. The storage backend API may need to grow some additional methods to

Re: FileField and ImageField

2016-03-19 Thread Cristiano Coelho
To add a bit more about this, it seems that FileField is really meant to be working with an OS file system, making it harder to use a custom Storage that sends data to somewhere like AWS S3 where basically everything is a file (there are no real folders, just key prefixes) These 3 functions

FileField and ImageField

2016-03-19 Thread Cristiano Coelho
I am recently trying to make an aws S3 storage (I know there are a few libraries in there but I needed some customization). The storage works fine so far! However, there are some implementation details on FileField and ImageField, in particular the function generate_filename https

Re: FileField and ImageField

2016-03-18 Thread Josh Smeaton
It seems like you have a pretty good grasp on the problems and possible solutions. I'm not familiar enough with storage backends and FileFields to provide much guidance so hopefully someone else can comment. Regarding the linked line in the save method which forces forward slashes, it seems

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
-Magee <russ...@keith-magee.com> wrote: > On Thu, Sep 16, 2010 at 2:28 AM, Yo-Yo Ma <baxterstock...@gmail.com> 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 reasona

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 <baxterstock...@gmail.com> 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 forgott

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 <baxterstock...@gmail.com> 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 &g

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

Re: Ability to delete contents of FileField and ImageField in admin

2008-08-18 Thread David Reynolds
On 18 Aug 2008, at 2:56 pm, Brian Rosner wrote: > Keep an eye on http://code.djangoproject.com/ticket/7048. Thanks, Brian. -- David Reynolds [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Ability to delete contents of FileField and ImageField in admin

2008-08-18 Thread Brian Rosner
nyone > give me a status update of whether or not it is possible to delete > the contents of a FileField or ImageField from within the admin? Keep an eye on http://code.djangoproject.com/ticket/7048. -- Brian Rosner http://oebfare.com --~--~-~--~~~---~--~~ You

Ability to delete contents of FileField and ImageField in admin

2008-08-18 Thread David Reynolds
of a FileField or ImageField from within the admin? Thanks, David -- David Reynolds [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group,

Re: proposal and patch: original_filename with FileField and ImageField

2006-12-08 Thread tsuyuki makoto
Ok, I just added a ticket(http://code.djangoproject.com/ticket/3119). Forget this patch at this time. Do you have any idea? 2006/12/4, tsuyuki makoto <[EMAIL PROTECTED]>: > Hello django developers. > > Currently, FIleField and ImageField store file-system-safe file name. >

proposal and patch: original_filename with FileField and ImageField

2006-12-04 Thread tsuyuki makoto
Hello django developers. Currently, FIleField and ImageField store file-system-safe file name. Imagine, if user upload a file named é.txt. Yes, File-system-safe file name is .txt or _.txt. It's not special case in Japan. I know Django says non dynamic contents should be served via apache-ish