Any reason not to have upload_to accept a string OR a callable and function accordingly? Justin
On 10/27/07, Robert Coup <[EMAIL PROTECTED]> wrote: > > > Presumably filename is optional, so only people who actually care will > use it... with that in mind, personally I'd save the back-compat > hassle and support upload_to (as it works now) as well as the > callable. And make it clear in the docs that all it does is > os.path.join() the two. It also might be worth making it clear that if > you do: > > os.path.join('/my/path/', '/something/beginning/with/slash/') the > result is '/something/beginning/with/slash/' - which is not > necessarily intuitive for someone new to os.path... > > Hmm. If i don't want to use upload_to, and just have a callable to > generate the entire path, then upload_to would need to be made > optional, and some check done that at least one of them is defined. It > doesn't look so nice having FileField(upload_to='', > filename=my_super_path_generator) > > Rob :) > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---