That is the exact purpose for the changes I made to this patch. It will allow you to subclass and override parts of FileField to store using other values in the model.
On Jul 24, 7:11 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm not using new forms... but wanted to ask about this since it was > one of the main reasons I didn't use FileField in my current code > base... and thought others might have a similar need going forward. > > When I upload files, I'm required to rename them and then move them to > different directories. Basically I create a uuid for the file name, > rename it, then create a directory (if it doesn't exist) using the > first character of the uuid, I then create a sub directory using > characters 2 and 3 of the uuid, and move the file there from the > upload location. I didn't see a way to do this with FileField or > ImageField in old forms ( I could have been mistaken, just tell me if > I am ) ... so I used 'old school' forms and uploaded the files that > way... and made the file name field a CharField. > > I know that this is a pretty specific example, but I thought it was a > bit restricting to always assume that all files in a FileField for a > model would be stored in the same directory off of Media. It would be > nice if there was an option to not set the upload_to path in the model > code, and have the capability of making it different for each entry. > Figured I'd mention this since you were asking for feedback. > > On Jul 23, 11:01 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> > wrote: > > > On 7/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > I tried some tricks to get this working as I think it should to keep > > > backwards compatibility for those with special file naming > > > requirements. > > > > Please give some feedback and tell me if i'm way off course. :) > > > Hi Oyvind > > > Apologies for not getting back to you on this. I've been clening out a > > few bugs in the serialization and test systems while I wait for some > > feedback from Adrian on some other tickets; looking at FileField got > > pushed off my plate for a bit. Hopefully I will get a chance to look > > at this ticket again in the very near future (maybe even tonight). > > > Yours, > > Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---