Hi guys!

I thinking on the possibility to put the id of object on the path
where a image will be uploaded. Ex:

class Test(models.Model):
    image = models.ImageField(upload_to='path/%Y/%m/%d/%(id)d')

This way I can preserve the file name untouched and can be sure will
have a unique filename. I want to do a function to return miniatures
of images on certain formats but reather than resize the image each
requisition, I rezise once and store a cache on the same directory of
the image. Having id on the path should help me.

What do you think?

Thanks!


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to