Adding a label_suffix to ModelForm

2019-06-23 22:37发布

问题:

How do I change the label_suffix on a ModelForm?

I want the model form to remove ":" from all labels.

回答1:

When the form is instantiated, you can pass label_suffix into it as follows:

list_form = ListForm(label_suffix="")