sorl-thumbnail: random name in Thumbnail field
Posted
by xRobot
on Stack Overflow
See other posts from Stack Overflow
or by xRobot
Published on 2010-04-29T15:39:41Z
Indexed on
2010/05/01
14:07 UTC
Read the original article
Hit count: 407
django
|sorl-thumbnail
I want to use str(uuid.uuid4())
instead of the name uploaded.
I have this model:
class foo(models.Model):
pic = ThumbnailField(upload_to='pics', size=(200, 200))
I am uploading hello_world.jpg
and I should save these named versions should be saved for example in 4ba9b397-da69-4307-9bce-e92887e84d2f.jpg
.
How can I do that?
© Stack Overflow or respective owner