getattr throws TypeError on ImageSpecField

83 views Asked by At
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')

... this gives me the following error: "TypeError: can't pickle instancemethod objects"

Django 1.7.1
ImageKit 3.2.4

0

There are 0 answers