本文整理汇总了Python中plone.app.contenttypes.behaviors.collection.ICollection.selectedViewFields方法的典型用法代码示例。如果您正苦于以下问题:Python ICollection.selectedViewFields方法的具体用法?Python ICollection.selectedViewFields怎么用?Python ICollection.selectedViewFields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类plone.app.contenttypes.behaviors.collection.ICollection
的用法示例。
在下文中一共展示了ICollection.selectedViewFields方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: selectedViewFields
# 需要导入模块: from plone.app.contenttypes.behaviors.collection import ICollection [as 别名]
# 或者: from plone.app.contenttypes.behaviors.collection.ICollection import selectedViewFields [as 别名]
def selectedViewFields(self):
"""Returns a list of all metadata fields from the catalog that were
selected.
"""
context = aq_inner(self.context)
wrapped = ICollection(context)
return wrapped.selectedViewFields()
示例2: tabular_fields
# 需要导入模块: from plone.app.contenttypes.behaviors.collection import ICollection [as 别名]
# 或者: from plone.app.contenttypes.behaviors.collection.ICollection import selectedViewFields [as 别名]
def tabular_fields(self):
"""Returns a list of all metadata fields from the catalog that were
selected.
"""
context = aq_inner(self.context)
wrapped = ICollection(context)
fields = wrapped.selectedViewFields()
fields = [field[0] for field in fields]
return fields