bag-of-holding.com

What's in the bag?

/2008/April/

Automatically resizing images with Django

Maybe, like me, you'd like to resize images automatically when they are uploaded and saved to you Django site. If so, here's how I did it (Django Snippet here__):: from PIL import Image class Photo(models.Model): source = models.ImageField(upload_to='images') def save(self, size=(400, 300)): """ Save Photo after ensuring it is not ...
Read more...