我已经按照本教程进行了尝试,但失败了。我已经完全按照教程中的方式复制了所有内容。问题是 ImageKit 没有创建缩略图(显示和缩略图图像)。
这里有一些细节:
>>> 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'