hello, upload_to can take a callable, which can be used to change your files' location.
konstantin On Sep 17, 2:42 pm, Faheem Mitha <[EMAIL PROTECTED]> wrote: > Hi, > > I wrote some unit tests for file upload. since I didn't want the files in > the unit tests to be uploaded to the "official locaion", I changed the > upload location by reassiging MEDIA_ROOT to something else, '/tmp' in this > case. > > With an upgrade to Django 1.0, this method no longer works. The file > upload appears to ignore the value of MEDIA_ROOT. > > Can anyone suggest another method? Apparently file upload is now more > flexible - videhttp://code.djangoproject.com/wiki/FileStorageRefactor. > I'm not sure if it is possible to use this kind of functionality to do > this. Suggestions welcome. > > Thanks, Faheem. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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-users?hl=en -~----------~----~----~----~------~----~------~--~---