seler
seler

Reputation: 9193

django-imagekit tutorial fail - not creating thumbnails

I've tried according to this tutorial but failed. I've got everything copied exactly as it is in tutorial. The problem is that ImageKit is not creating thumbnails (both display and thumbnail images).

Here is some detail:

>>> from myapp.models import Photo
>>> p = Photo.objects.all()[0]
>>> p.original_image.url
'photos/lena.jpg'
>>> p.display.url
Traceback (most recent call last):
  File "<console>", line 1, in <module>
AttributeError: 'Photo' object has no attribute 'display'
>>> p.thumbnail_image.url
Traceback (most recent call last):
  File "<console>", line 1, in <module>
AttributeError: 'Photo' object has no attribute 'thumbnail_image'

Upvotes: 0

Views: 1055

Answers (1)

rolling stone
rolling stone

Reputation: 13016

You should consider using PIL to create thumbnails: http://www.pythonware.com/products/pil/

Really easy to use, and easy to follow tutorials: http://effbot.org/imagingbook/image.htm

Upvotes: 2

Related Questions