filebrowser-safe
filebrowser-safe copied to clipboard
Filebrowser field doesnt work inside editable
Issue
I have this model field
image = FileField(verbose_name=_("Image"), upload_to="images", format="Image", max_length=255, null=True, blank=True)
- Uploading images using regular admin works fine
- When called inside editable, the FileBrowserWidget seems not to be called properly. AddFileBrowser.js is not loaded, and also some attributes of final_attrs are not passed to the custom field template (specifically the id attribute)
I can work around by adding AddFileBrowser.js in the editable_loader template, and adding some js to fill in the id attributes