我正在使用django 1.5和django-imagekit == 3.0.1
我的settings.py修改:
IMAGEKIT_CACHEFILE_DIR = MEDIA_ROOT + '/imges_cache'
模型字段:
photo = models.ImageField(_(u"Photo"), upload_to="user_photos/",
blank=True, null=True)
thumb = ImageSpecField([ResizeToFill(129, 129)], source='photo')
thumb_small = ImageSpecField([ResizeToFill(49, 48)], source='photo')
问题是当我运行命令时:
python manage.py generateimages
我明白了:
Validating generator: cv:personalinfo:thumb_small
/home/user/app/static_files/media/imges_cache/user_photos/photo1/9b9a3c24f189efc6117357427a9f8b33.jpg
FAILED: function takes at most 11 arguments (13 given)
Validating generator: cv:personalinfo:thumb
/home/user/app/static_files/media/imges_cache/user_photos/photo1/fe6c67625b129ceffcd65f197413b7f9.jpg
FAILED: function takes at most 11 arguments (13 given)
Validating generator: imagekit:thumbnail
所以我无法生成缓存文件。
答案 0 :(得分:1)
听起来像你遇到Issue #193中描述的问题。总之,您已经全局安装了PIL,但本地安装了Pillow,两者不兼容。查看Issue #173 on the Pillow project了解详情。