Blog Archive for May 1, 2011

Django Thumbnails

May 1, 2011

Here's a simple mechanism for automatically creating thumbnails of images in Django. This is tested in Django 1.2.

Model

On the model, add a new field to hold the thumbnail. Mark it editable=False to avoid it being shown in the admin.

class ModelObject(models.Model):
    #...
    photo …