当前位置: 首页>>代码示例>>Python>>正文


Python ICollection.customViewFields方法代码示例

本文整理汇总了Python中plone.app.contenttypes.behaviors.collection.ICollection.customViewFields方法的典型用法代码示例。如果您正苦于以下问题:Python ICollection.customViewFields方法的具体用法?Python ICollection.customViewFields怎么用?Python ICollection.customViewFields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在plone.app.contenttypes.behaviors.collection.ICollection的用法示例。


在下文中一共展示了ICollection.customViewFields方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: migrate_schema_fields

# 需要导入模块: from plone.app.contenttypes.behaviors.collection import ICollection [as 别名]
# 或者: from plone.app.contenttypes.behaviors.collection.ICollection import customViewFields [as 别名]
    def migrate_schema_fields(self):
        # migrate the richtext
        super(CollectionMigrator, self).migrate_schema_fields()

        # migrate the rest of the schema into the behavior
        wrapped = ICollection(self.new)
        wrapped.query = self.old.query
        wrapped.sort_on = self.old.sort_on
        wrapped.sort_reversed = self.old.sort_reversed
        wrapped.limit = self.old.limit
        wrapped.customViewFields = self.old.customViewFields
开发者ID:naro,项目名称:plone.app.contenttypes,代码行数:13,代码来源:migration.py

示例2: migrate_criteria

# 需要导入模块: from plone.app.contenttypes.behaviors.collection import ICollection [as 别名]
# 或者: from plone.app.contenttypes.behaviors.collection.ICollection import customViewFields [as 别名]
    def migrate_criteria(self):
        """Migrate old style to new style criteria.

        Plus handling for some special fields.
        """
        # The old Topic has boolean limitNumber and integer itemCount,
        # where the new Collection only has limit.
        adapted = ICollection(self.new)
        if self.old.getLimitNumber():
            adapted.limit = self.old.getItemCount()
        adapted.customViewFields = self.old.getCustomViewFields()

        # Get the old data stored by the beforeChange_criteria method.
        if self._collection_sort_reversed is not None:
            adapted.sort_reversed = self._collection_sort_reversed
        if self._collection_sort_on is not None:
            adapted.sort_on = self._collection_sort_on
        if self._collection_query is not None:
            adapted.query = self._collection_query
开发者ID:jianaijun,项目名称:plone.app.contenttypes,代码行数:21,代码来源:topics.py


注:本文中的plone.app.contenttypes.behaviors.collection.ICollection.customViewFields方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。