Closed alsoicode closed 9 years ago
Hmm, I'm pretty sure this isn't a pilkit thing; looks like just IK is involved.
You're seeing this error because the first argument to ProcessedImageField is an iterable of processors, but you're providing a string. (This is the same problem you're seeing in matthewwithanm/django-imagekit#308.)
What does that string ("Profile Image") represent? Is there some documentation that shows the constructor accepting that?
Perhaps this is a bit of legacy code in Djago that still works, as I can't find it in the current docs online, but you can provide a string as the first argument of a field, except in the case of a ForeignKey or ManyToMany and it will be used as the label attribute for the field.
I've just moved those labels to the form class for the model to work around it, but that's something I've done for years with model fields where I don't need a separate ModelForm class.
Ah okay. Well I'm going to close this since it's not really a pilkit issue and it's the same as matthewwithanm/django-imagekit#308. We should be able to add support for that but we'll have to be careful not to break anything for people passing processors in as an unnamed, first position arg (i.e by checking if it's a string).
I'm getting an interesting exception when using a ProcessedImageField from django-imagekit in processors/base.py line 15 using Python 3.4 and Django 1.7.4 and specifying a label argument on my model:
It looks like the ProcessedImageField might be making some incorrect assumptions about what args are passed to it. If I define my model as:
the
AttributeError
is thrown. If I remove the label argument for the field, it works as expected.