Django:删除此空白字段的任何方法? [英] Django:any way to remove this clear field?
本文介绍了Django:删除此空白字段的任何方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么方法可以删除此模型表单文件字段的清除"复选框吗?我知道我可以为文件字段定义自定义"窗口小部件,但是如何在其中解决此复选框?
Is there any way I can remove this model form file field's 'clear' checkbox?.I know that I can define the 'custom' widget for file field but how to address this checkbox in that?
推荐答案
您需要将小部件从ClearableFileInput更改为Fileinput
You need to change the widget from the ClearableFileInput to Fileinput https://docs.djangoproject.com/en/dev/ref/forms/widgets/#fileinput
这篇关于Django:删除此空白字段的任何方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文