将一个label_suffix添加到ModelForm [英] Adding a label_suffix to ModelForm
本文介绍了将一个label_suffix添加到ModelForm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在 ModelForm
之间更改 label_suffix
?
我希望模型表单从所有标签中删除:。
I want the model form to remove ":" from all labels.
推荐答案
当表单被实例化时,你可以通过 label_suffix
如下:
When the form is instantiated, you can pass label_suffix
into it as follows:
list_form = ListForm(label_suffix="")
这篇关于将一个label_suffix添加到ModelForm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文