Re: Bug or feature: pre_save used on FileField/ImageField doesn't work as in Django 1.0.2

2009-04-28 Thread Lior Gradstein
About the initial problem that started this thread, the associated bug number is #10948. On Apr 6, 10:41 pm, Karen Tracey wrote: > On Mon, Apr 6, 2009 at 1:56 PM, Marty Alchin wrote: > > > On Mon, Apr 6, 2009 at 1:16 PM, Karen Tracey

Re: Bug or feature: pre_save used on FileField/ImageField doesn't work as in Django 1.0.2

2009-04-06 Thread Karen Tracey
On Mon, Apr 6, 2009 at 1:56 PM, Marty Alchin wrote: > > On Mon, Apr 6, 2009 at 1:16 PM, Karen Tracey wrote: > > I feel like I'm going around in circles thinking about this one -- is > there > > a way out that someone else sees that I'm blind to? > >

Re: Bug or feature: pre_save used on FileField/ImageField doesn't work as in Django 1.0.2

2009-04-06 Thread Marty Alchin
On Mon, Apr 6, 2009 at 1:16 PM, Karen Tracey wrote: > We cannot know for sure what the file name is until it is saved to disk, as > the save operation may tack on underscores when handling race conditions. > Thus we cannot delay file save to a field pre_save routine and

Re: Bug or feature: pre_save used on FileField/ImageField doesn't work as in Django 1.0.2

2009-04-06 Thread Karen Tracey
On Thu, Apr 2, 2009 at 12:33 PM, Marty Alchin wrote: > > A related, thus-far-unreported (I think) issue comes up when > attempting to access width_field and height_field attributes on a > model prior to saving the new file. > Actually it looks like this was kinda reported,

Re: Bug or feature: pre_save used on FileField/ImageField doesn't work as in Django 1.0.2

2009-04-02 Thread Karen Tracey
I'm short on time right now so I just want to respond to one part of this that I just noticed and I'll come back later to digest the rest. Thanks for the background on the why to r9766. I knew it was model-validation related but didn't know what the specific issue was. It helps to have a clearer

Re: Bug or feature: pre_save used on FileField/ImageField doesn't work as in Django 1.0.2

2009-04-02 Thread Marty Alchin
On Thu, Apr 2, 2009 at 11:45 AM, Karen Tracey wrote: > I think it's a bug, and I'm pretty sure it was introduced by r9766.  The > setting of the actual file name that will be used (which pulls in the > upload_to path and possibly tacks on some underscores if the uploaded

Re: Bug or feature: pre_save used on FileField/ImageField doesn't work as in Django 1.0.2

2009-04-02 Thread Karen Tracey
On Thu, Apr 2, 2009 at 8:59 AM, Lior Gradstein wrote: > > I noticed an important change in behaviour between Django 1.0.2 and > Django 1.1+ (svn and beta versions). > > If I set a signal that intercepts as pre_save and try to access a > FileField/ImageField's path, I

Bug or feature: pre_save used on FileField/ImageField doesn't work as in Django 1.0.2

2009-04-02 Thread Lior Gradstein
I noticed an important change in behaviour between Django 1.0.2 and Django 1.1+ (svn and beta versions). If I set a signal that intercepts as pre_save and try to access a FileField/ImageField's path, I don't get the same result. It seems the 'upload_to' attribute is not taken into account! It