Like I said, you can't do it pre_save anymore cause revision 4609 changed the time save_file gets called. The way it works now, when save_file first get called, your object has not yet been saved, and thus doesn't have a primary key.
On 3/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > You need to do it pre_save > > On 2 Mar, 09:37, "Brice Carpentier" <[EMAIL PROTECTED]> > wrote: > > Hi folks. > > > > Since my last svn update, things have been kinda broken in my cms-like > > django application. > > I've been able to track down the issue to the thumbnail app I'm using, > > that does automatic primary-key based renaming on ImageFields. > > It does that by connecting to the pre_save signal of the model the > > field is in, and it used to work since FileFields were saved *after* > > the base model was saved. > > > > Now let me introduce you with revision 4609 and its summary : > > > > == > > Objects with FileFields no longer get save() called multiple times from the > > Auto > > maticManipulator! This fixes #639, #572, and likely others I don't know of. > > > > This may be slightly backwards-incompatible: if you've been relying on the > > multi > > ple-save behavior (why?), then you'll no longer see that happen. > > == > > > > When I first saw this comment I was like "yeah, this just rocks, now > > we'll finally be able to deal with thumbnailing / renaming in the > > model, not by using yet another field !", and then the obvious stroke > > me : "holly shit, we'll HAVE to do it really soon !" > > > > I tried to have the ImageWithThumbnailField connect to the post_save > > signal, and it's kinda working. Well, thumbnailing and renaming the > > file is correct, the only problem being that the field's value never > > gets updated. > > > > Any idea on how to fix this quickly ? > > > > Regards, > > > > -- > > Brice Carpentier aka Br|ce > > > > > -- Brice Carpentier aka Br|ce --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---