Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
现在,每当我创建一个具有 FK 字段的模型表单时,都会显示一个选择菜单,并且第一项是 --------- 这意味着没有选择任何内容。我怎样才能将 -------- 更改为“选择某些东西”或我想要的任何东西?
这是 ModelChoiceField 的空标签。你可以设置它ModelChoiceField(empty_label=u'your text here')。
ModelChoiceField(empty_label=u'your text here')