Customization
Customize upload widget
The UploadWidget and UploadMultipleWidget is rendered by a template django_file_form/upload_widget.html, which contains the <input type="file"> widget and a few hidden fields
for additional information.
You can customize the look and feel of the widget by overriding this template. Because Django by default does not use customized templates for form-rendering, you will need to
- Include django.forminDJANGO_APPS
- Add FORM_RENDERER = 'django.forms.renderers.TemplatesSetting'tosettings.py
- Add django_file_form/upload_widget.htmlto your projectstemplatesdirectory (orjinja2if you use jinja2 to render the templates). The upload widget will be available as variablewidgetand you can use its attributes such aswidget.attrs.idto customize it.