是否需要填充 Plon SelectionWidget?
我想在稍后填充的表单上放置一个空的选择小部件。代码如下:
atapi.StringField(
'catalognumber1',
storage=atapi.AnnotationStorage(),
widget=atapi.SelectionWidget(
label='Catalog Number 1',
description=_(u"Please select the catalog number for your first conflicting class, e.g. 101"),
),
required=1,
searchable=True,
),
没有框显示,实际上什么也没有显示。是否需要预先填充选择小部件?
I would like to put an empty selection widget on a form that will be populated later. Here is the code:
atapi.StringField(
'catalognumber1',
storage=atapi.AnnotationStorage(),
widget=atapi.SelectionWidget(
label='Catalog Number 1',
description=_(u"Please select the catalog number for your first conflicting class, e.g. 101"),
),
required=1,
searchable=True,
),
No box shows, actually, nothing shows. Does a selection widget need to be pre-populated?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,至少放置一个空词汇
atapi.StringField(
'目录号1',
存储=atapi.AnnotationStorage(),
词汇=( ('', '') ),
稍后用一个好的词汇代替它(更好:词汇工厂)
Yes, put at least an empty vocabulary
atapi.StringField(
'catalognumber1',
storage=atapi.AnnotationStorage(),
vocabulary=( ('', '') ),
Later, substitute this with a good vocabulary (better: a vocabulary_factory)