我正在使用 Python Dexterity Type 编写一个产品,并且我有Title
and Description
,这个字段来自一个行为plone.app.dexterity.behaviors.metadata.IDublinCore
,但我需要用我的字段重新排序字段。
Example:
我的领域:文献、拼贴、年龄、传记
IDublinCore:标题、描述
顺序:拼贴、标题、文件、年龄、传记、描述
我怎么做?
既然你有自己的敏捷类型,你可以处理form directives
aka setting taggedValues
在界面上。
from plone.autoform import directives
class IYourSchema(model.Schema):
directives.order_before(collage='IDublinCore.title')
collage = schema.TextLine(
title=u'Collage',
)
您可以在 plone 文档中找到有关此功能的优秀文档http://docs.plone.org/external/plone.app.dexterity/docs/reference/form-schema-hints.html#appearance-lated-directives
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)