Re: FileFields and file ownership

2009-10-21 Thread anentropic
Just dropping by to add my support for adding this functionality. At the moment it doesn't seem consistent that you automatically delete the file when you delete a model (...what if something else was using it?!) but don't do the same when uploading a new file to the same field. It should be co

Re: FileFields and file ownership

2009-08-29 Thread Léon Dignòn
I would love to see this feature in Django as soon as possible :) something like: avatar = ImageField(upload_to='avatars', blank=True, replace_on_upload=True) Also a Widget which adds a Checkbox to a ModelForm to clear the ImageField, like RemovableFileField in ticket #7048, would be great! On

Re: FileFields and file ownership

2009-08-26 Thread Ole Laursen
On Aug 11, 1:39 pm, Ole Laursen wrote: >   1) a convenient file pointer for facilitating the upload machinery >   2) a field for storing a file, just like storing it directly in the > database except we put the data in the file system No conclusion? Here are some options 1. Apply the patch in

Re: FileFields and file ownership

2009-08-12 Thread Chris Beaven
On Aug 12, 3:08 pm, Malcolm Tredinnick wrote: > One of the reasons we *don't* delete files automatically [...snip] Just a correction: Django currently *does* delete files automatically when a model instance is deleted. --~--~-~--~~~---~--~~ You received this messa

Re: FileFields and file ownership

2009-08-12 Thread Ole Laursen
On Aug 12, 5:08 am, Malcolm Tredinnick wrote: > This is an assumption that isn't universally correct and it's > implications appear to be vastly under-appreciated. One of the reasons > we *don't* delete files automatically is that you cannot you know for > certain, given no other information, tha

Re: FileFields and file ownership

2009-08-12 Thread Jonas Pfeil
Hi, I just wanted to mention there still is ticket #7048 "Support clearing FileFields with ModelForms" [1], which also deletes files, if configured to do so. I don't think this is particularly evil, if off by default (which it is not in the current patch, but that's easy to change). This was ori

Re: FileFields and file ownership

2009-08-11 Thread Malcolm Tredinnick
On Tue, 2009-08-11 at 04:39 -0700, Ole Laursen wrote: > Hi! > > There are a couple of bugs open/closed about what happens when you > upload a new file to a file field that already has a file: > > http://code.djangoproject.com/ticket/11663 > http://code.djangoproject.com/ticket/2983 > http:

FileFields and file ownership

2009-08-11 Thread Ole Laursen
Hi! There are a couple of bugs open/closed about what happens when you upload a new file to a file field that already has a file: http://code.djangoproject.com/ticket/11663 http://code.djangoproject.com/ticket/2983 http://code.djangoproject.com/ticket/4339 Progress is currently halted bec