Re: Help with Imagefile

2011-01-12 Thread Piotr Kilczuk
Hi, > upload_to can be a callable, ie a function that handles the uploaded file. > This is passed the image file and original filename, and should return the > absolute path. See the documentation: > > http://docs.djangoproject.com/en/1.2/ref/models/fields/#django.db.models.FileField.upload_to >

Re: Help with Imagefile

2011-01-12 Thread Daniel Roseman
On Wednesday, January 12, 2011 6:11:27 AM UTC, nlub...@gmail.com wrote: > > hello, i have a very simple question. its about imagefiles > > my model > class Usuario(models.Model): > ImagenEmpresa = models.ImageField(upload_to = 'perfil/', > null=True) > > my template >

Re: Help with Imagefile

2011-01-12 Thread Piotr Kilczuk
Hi, 2011/1/12 nlub...@gmail.com > > if im uploading a "testofimage.gif" > i would like to save it as "Profileoduser.gif" > I think you can code your own field that inherit's from imagefield. You possibly could also modify the save method and rename the file/image field raw value there (just be