Re: Altering data uploaded to FileField before save is called

2008-09-10 Thread Sean Legassick
On 10 Sep 2008, at 15:38, Brian Rosner wrote: >> I think that the commit=False (or save=False in FieldFile.save() ) >> should not do the save to the storage backend. > > Agreed. I have been considering treating FileFields the same as > many-to-many fields when commit=False in a ModelForm. In the

Re: Altering data uploaded to FileField before save is called

2008-09-10 Thread Joseph Kocherhans
On Wed, Sep 10, 2008 at 7:38 AM, Brian Rosner <[EMAIL PROTECTED]> wrote: > > On Wed, Sep 10, 2008 at 8:13 AM, shadfc <[EMAIL PROTECTED]> wrote: >> The problem is that FieldFiles get saved to the storage backend even >> on a save(commit=False), and (according to a more knowledgeable SeanL- >> on #d

Re: Altering data uploaded to FileField before save is called

2008-09-10 Thread Brian Rosner
On Wed, Sep 10, 2008 at 8:50 AM, Karen Tracey <[EMAIL PROTECTED]> wrote: > I agree with what you're saying, but wouldn't changing whether the file is > saved when commit=False be a backwards-incompatible change? Do we need to > preserve current behavior for backwards-compatibility sake and find a

Re: Altering data uploaded to FileField before save is called

2008-09-10 Thread Karen Tracey
On Wed, Sep 10, 2008 at 10:38 AM, Brian Rosner <[EMAIL PROTECTED]> wrote: > On Wed, Sep 10, 2008 at 8:13 AM, shadfc <[EMAIL PROTECTED]> wrote: > > The problem is that FieldFiles get saved to the storage backend even > > on a save(commit=False), and (according to a more knowledgeable SeanL- > > on

Re: Altering data uploaded to FileField before save is called

2008-09-10 Thread Brian Rosner
On Wed, Sep 10, 2008 at 8:13 AM, shadfc <[EMAIL PROTECTED]> wrote: > The problem is that FieldFiles get saved to the storage backend even > on a save(commit=False), and (according to a more knowledgeable SeanL- > on #django), the FieldFile will only get saved once, the first time > through. So th

Altering data uploaded to FileField before save is called

2008-09-10 Thread shadfc
My use case is this: I'm using a custom filestorage backend to Amazon S3. An inline model allows the upload of mp3 files and I am trying to edit the ID3 tag on these before they get saved to backend. To accomplish this, I've overridden the save_formset() on the parent ModelAdmin to do a save(co