Re: Resize image if too large

2010-03-15 Thread Rafael de Oliveira Lopes Gonçalves
By the way, I don't think the user should wait for this kind of heavy load work (resizing images, waiting the response). Try to use lazy or remote call after you saved the image. Give celery a try: http://ask.github.com/celery/ -- Rafael Lopes (11)6729-1897 On Mon, Mar 15, 2010 at 1:59 PM, Wh

Re: Resize image if too large

2010-03-15 Thread When ideas fail
Turned out it was all up the pole, but have it working now. The validation to check the size did work though. On 15 Mar, 16:12, "ge...@aquarianhouse.com" wrote: > well, something is missing, like > > def save(self, *args, **kwargs): >     #your code > > but in our case the form class should do th

Re: Resize image if too large

2010-03-15 Thread ge...@aquarianhouse.com
well, something is missing, like def save(self, *args, **kwargs): #your code but in our case the form class should do the validation... On Mar 15, 5:07 pm, When ideas fail wrote: > Hello, I've been trying to create a save method which resizes an image > if it is too large. Using pil this is

Resize image if too large

2010-03-15 Thread When ideas fail
Hello, I've been trying to create a save method which resizes an image if it is too large. Using pil this is what I have so far: class Photo(models.Model): title = models.CharField(max_length=750) photo = models.FileField(upload_to='full_size/') alt = models.CharField(max_length=50, n