getattr在ImageSpecField上抛出TypeError

时间:2014-12-02 02:44:36

标签: python django django-imagekit

class MyModel(models.Model):
    ...
    original_image = models.ImageField(upload_to=upload_image_to)

    thumbnail = ImageSpecField(
        processors=thumbnail_processors,
        source='original_image',
        format='PNG'
    )
    ...

obj = MyModel()
val = getattr(obj, 'thumbnail')

...这给了我以下错误:“TypeError:无法pickle instancemethod对象”

Django 1.7.1
ImageKit 3.2.4

0 个答案:

没有答案