-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
I am using ImageField on a model and use a Modelform to generate a form.
If I understand correctly, the form automatically uses the widget provided by this package, being ClearableFileInput, with and added preview of the image.
I'd like to use a different widget in my form, but overriding the widget on the form level, fails because it still seems to run this function:
def with_preview_and_ppoi(widget, **attrs):
return type(
str("%sWithPreviewAndPPOI" % widget.__name__),
(PreviewAndPPOIMixin, widget),
dict(attrs, __module__="imagefield.widgets"),
)
I tried using just forms.ClearableFileInput, and get the error:
'ClearableFileInput' object has no attribute 'name'
I'm having difficulties wrapping my head around where to change or alter the widget. Would you be able to give me some pointers? If you think this hasn't got enough to do with this particular package, I would understand, but I'm not sure.
Metadata
Metadata
Assignees
Labels
No labels