Re: Changing filenames on an upload...

2006-03-13 Thread Petar Marić
Hi Tony, You should look for rename_by_field() in http://djangoutils.python-hosting.com/wiki/Utils -- Petar Marić *e-mail: [EMAIL PROTECTED] *mobile: +381 (64) 6122467 *icq: 224720322 *skype: petar_maric *web: http://www.petarmaric.com/ --~--~-~--~~~---~--~~ You

Re: Changing filenames on an upload...

2006-03-12 Thread tonemcd
Ahhh... Should have said I was using magic-removal, and that this is within the admin interface. The reason for the uuid filename is because I'm thinking of having a lot of files uploaded and I could end up with dozens of files called 'TEST.DOC' and this is one way of guaranteeing that the filen

Re: Changing filenames on an upload...

2006-03-12 Thread Malcolm Tredinnick
On Sun, 2006-03-12 at 14:45 +, tonemcd wrote: > Hi all, > I have this model > > class Photo(models.Model): > name = models.CharField(maxlength=20) > image = models.ImageField(upload_to="cetl/") > > def save(self): > import commands > self.image = 'cetl/%s' % comma