Re: ImageField file naming

2007-11-30 Thread Marty Alchin
I don't have a definitive answer at this point, no. Everybody who wants some form of flexible file naming has a different need, and it's tough to come up with something that pleases everyone, while still being a fairly concise API. I've been giving it some thought, and I'll make sure to bring it up

Re: ImageField file naming

2007-11-30 Thread Chris Hoeppner
I guess you don't have a hint for me to get this working? It seems like everyone's having that rename issue where _get_pk returns none. I'm just blind-guessing, but perhaps the way to go might be "moving" the file on post_save onto another name, since pre_save doesn't provide a pk value? I don't

Re: ImageField file naming

2007-11-23 Thread Chris Hoeppner
El mar, 20-11-2007 a las 15:41 -0500, Marty Alchin escribió: > On Nov 20, 2007 3:33 PM, Chris Hoeppner <[EMAIL PROTECTED]> wrote: > > It would be nice to be able to include this in the upload_to parameter. > > Something like > > 'upload/%(model_name)s/%(instance_id)s.%(mimetype_extension)s' perhap

Re: ImageField file naming

2007-11-20 Thread Marty Alchin
On Nov 20, 2007 3:33 PM, Chris Hoeppner <[EMAIL PROTECTED]> wrote: > It would be nice to be able to include this in the upload_to parameter. > Something like > 'upload/%(model_name)s/%(instance_id)s.%(mimetype_extension)s' perhaps? > Maybe, if the parameter ends with a slash, the handler could kno

ImageField file naming

2007-11-20 Thread Chris Hoeppner
Hi there! I've seen this in patches and stuff before, but most don't work anymore. Perhaps some Django-insider could advice me how to make Django rename uploaded files according to some schema when saving them to disk? Preserving the original filename is ok for most cases, but sometimes it just