Hi,

This is a fantastic app, though it might be too fat for a minimalist like 
me.   ^_^

I would recommend override the default save method of the model and resize 
the original photo using PIL. For the overriding part, you could consult the 
documentation: 
http://docs.djangoproject.com/en/dev/topics/db/models/#overriding-predefined-model-methods

------------------------
Xia Kai(夏恺)
xia...@gmail.com
http://blog.xiaket.org

--------------------------------------------------
From: "Chris Moffitt" <ch...@moffitts.net>
Sent: Saturday, January 02, 2010 11:59 PM
To: <django-users@googlegroups.com>
Subject: Re: Photo + thumbnail

> You'll probably want to use one of Django's thumbnail apps. Here's the one 
> I
> recommend:
> http://code.google.com/p/sorl-thumbnail/*
>
> -*Chris
>
> On Sat, Jan 2, 2010 at 9:48 AM, nameless <xsatelli...@gmail.com> wrote:
>
>> Hi everyone I have a simple question.
>> This is my model:
>>
>>
>> class book(models.Model):
>>    title = models.CharField(max_length=50)
>>    photo = models.ImageField(upload_to='images/avatar/')
>>    thumb = models.ImageField(upload_to='images/thumb/')
>>
>>
>>
>> I want in photo original photo and in thumb the same photo but
>> resized.
>> How do I do that in simplest way ?
>>
>>
>>
>>
>> Thank you and Good year  ^_^
 

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to