django imagekit教程失败-未创建缩略图

django imagekit教程失败-未创建缩略图,django,django-imagekit,Django,Django Imagekit,我试过了,但失败了。我把所有的东西都复制到了教程中。问题是ImageKit没有创建缩略图(显示图像和缩略图) 以下是一些细节: >>> from myapp.models import Photo >>> p = Photo.objects.all()[0] >>> p.original_image.url 'photos/lena.jpg' >>> p.display.url Traceback (most recent

我试过了,但失败了。我把所有的东西都复制到了教程中。问题是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'
>>从myapp.models导入照片
>>>p=Photo.objects.all()[0]
>>>p.original_image.url
'照片/lena.jpg'
>>>p.display.url
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
AttributeError:“照片”对象没有属性“显示”
>>>p.thumbnail\u image.url
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
AttributeError:“照片”对象没有“缩略图图像”属性

> p>你应该考虑使用pIL来创建缩略图:

非常易于使用,并且易于遵循教程:

我也使用PIL,它非常简单。Image.open('/path/to/Image').thumbnail(500300),Image.ANTIALIAS)除了使用PIL之外,没有缓存事实证明这是此版本中的一个bug。