jdriscoll/django-imagekit — pull request #136 by dekkers (2012-06-16 23:14:15+00:00)
Title: Add is_valid method to Spec class

This change adds the method is_valid to the Spec class. I'm using the celery backend to generate thumbnails and when a lot of images get uploaded at once not all thumbnails are available when a page is requested right after the upload. The is_valid method makes it possible to check whether the image is available and do something else in case it isn't, instead of taking a lot of time and resources to generate the thumbnails in the page request. You could for example use it in a template to show a placeholder image when a thumbnail isn't available:
```
{% if image.thumbnail.is_valid %}