python - Django:有什么办法可以删除这个清晰的字段?

标签 python django

有什么方法可以删除此模型表单文件字段的“清除”复选框吗?我知道我可以为文件字段定义“自定义”小部件,但如何处理其中的此复选框? enter image description here

最佳答案

您需要将小部件从 ClearableFileInput 更改为 Fileinput https://docs.djangoproject.com/en/dev/ref/forms/widgets/#fileinput

关于python - Django:有什么办法可以删除这个清晰的字段?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11949945/

相关文章:

python - Django 中的 Bootstrap3 选项卡

python - django-advanced-filters 'grp_tags' 不是有效的标签库

Django - 在 ArrayField 中查询最新日期

python - 使用 ausent 值填充动态列表查询集并将其合并

python - 使用 API key 进行 Urllib2 身份验证

python - 使用 COM 连接到正在运行的 Visual Studio 2003 实例,构建并读取输出

python - 无法将文档添加到 Solr : Solr responded with an error (HTTP 400) (django + haystack + solr)

python - Postgresql:将本地数据库迁移到 PythonAnywhere 数据库

python - Matlab 相当于 `endsWith` : How to filter list of filenames regarding their extension?

python - 哪个更有效 : tf. where 或 element-wise multiplication?