Photo + thumbnail

2010-01-02 Thread nameless
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

Re: Photo + thumbnail

2010-01-02 Thread Chris Moffitt
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 wrote: > Hi everyone I have a simple question. > This is my model: > > > class book(models.Model): >title = mode

Re: Photo + thumbnail

2010-01-02 Thread nameless
Thank you but I want to do that without external apps if possible :) I am looking for a simplest way to create a thumbnail automatically when a new book is created. -- On Jan 2, 4:59 pm, Chris Moffitt wrote: > You'll probably want to use one of Django's thumbnail apps. Here's th

Re: Photo + thumbnail

2010-01-02 Thread 夏恺
/topics/db/models/#overriding-predefined-model-methods Xia Kai(夏恺) xia...@gmail.com http://blog.xiaket.org -- From: "Chris Moffitt" Sent: Saturday, January 02, 2010 11:59 PM To: Subject: Re: Photo + thumbnail

Re: Photo + thumbnail

2010-01-04 Thread nameless
--------- > From: "Chris Moffitt" > Sent: Saturday, January 02, 2010 11:59 PM > To: > Subject: Re: Photo + thumbnail > > > You'll probably want to use one of Django's thumbnail apps. Here's the one > > I > > recommend: > &

Re: Photo + thumbnail

2010-01-04 Thread nameless
--------- > From: "Chris Moffitt" > Sent: Saturday, January 02, 2010 11:59 PM > To: > Subject: Re: Photo + thumbnail > > > You'll probably want to use one of Django's thumbnail apps. Here's the one > > I > > recommend: > >

Re: Photo + thumbnail

2010-01-04 Thread Justin Myers
ave 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-pre... > > > > > Xia Kai(夏恺) > > xia...@gm

Re: Photo + thumbnail

2010-01-04 Thread nameless
ight 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 > > > doc