I solve this problem
In ImageWithThumbnailField need replace method "formfield"
def formfield(self, **kwargs):
defaults = {'widget': ImageWithThumbnailWidget}
defaults.update(kwargs)
return super(ImageWithThumbnailField,
self).formfield(**defaults)
--~--~-~-
Hi evebody! :)
How I may change widget in inlineformset_factory ?
I have field (Image with thumbnail - this is Satchmo code), and have
custom widget.
class ImageWithThumbnailWidget(forms.FileInput):
"""
A FileField Widget that shows its current image as a thumbnail if
it has one.
"""
2 matches
Mail list logo