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.
当我将 ReferenceField 与 ReferenceWidget 一起使用时,总会有一些选项指代真实对象,其中一个位于顶部,名为<No reference>. 可以隐藏该选项吗?
<No reference>
是的,required将字段的属性设置为 True。
required
ReferenceField( name='references', required=True, # ... )