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


Python ZSQLCatalog.ZCatalog类代码示例

本文整理汇总了Python中Products.ZSQLCatalog.ZSQLCatalog.ZCatalog的典型用法代码示例。如果您正苦于以下问题:Python ZCatalog类的具体用法?Python ZCatalog怎么用?Python ZCatalog使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: countResults

 def countResults(self, query=None, **kw):
     """
         Calls ZCatalog.countResults with extra arguments that
         limit the results to what the user is allowed to see.
     """
     # XXX This needs to be set again
     #if not _checkPermission(
     #    Permissions.AccessInactivePortalContent, self):
     #    base = aq_base(self)
     #    now = DateTime()
     #    #kw[ 'effective' ] = { 'query' : now, 'range' : 'max' }
     #    #kw[ 'expires'   ] = { 'query' : now, 'range' : 'min' }
     catalog_id = self.getPreferredSQLCatalogId(kw.pop("sql_catalog_id", None))
     query = self.getSecurityQuery(query=query, sql_catalog_id=catalog_id, **kw)
     kw.setdefault('limit', self.default_count_limit)
     # get catalog from preference
     return ZCatalog.countResults(self, query=query, sql_catalog_id=catalog_id, **kw)
开发者ID:alvsgithub,项目名称:erp5,代码行数:17,代码来源:CatalogTool.py

示例2: searchResults

    def searchResults(self, query=None, **kw):
        """
        Calls ZCatalog.searchResults with extra arguments that
        limit the results to what the user is allowed to see.
        """
        #if not _checkPermission(
        #    Permissions.AccessInactivePortalContent, self):
        #    now = DateTime()
        #    kw[ 'effective' ] = { 'query' : now, 'range' : 'max' }
        #    kw[ 'expires'   ] = { 'query' : now, 'range' : 'min' }

        catalog_id = self.getPreferredSQLCatalogId(kw.pop("sql_catalog_id", None))
        query = self.getSecurityQuery(query=query, sql_catalog_id=catalog_id, **kw)
        kw.setdefault('limit', self.default_result_limit)
        # get catalog from preference
        #LOG("searchResult", INFO, catalog_id)
        #         LOG("searchResult", INFO, ZCatalog.searchResults(self, query=query, sql_catalog_id=catalog_id, src__=1, **kw))
        return ZCatalog.searchResults(self, query=query, sql_catalog_id=catalog_id, **kw)
开发者ID:alvsgithub,项目名称:erp5,代码行数:18,代码来源:CatalogTool.py

示例3: unrestrictedCountResults

 def unrestrictedCountResults(self, REQUEST=None, **kw):
     """Calls ZSQLCatalog.countResults directly without restrictions.
     """
     return ZCatalog.countResults(self, REQUEST, **kw)
开发者ID:alvsgithub,项目名称:erp5,代码行数:4,代码来源:CatalogTool.py

示例4: unrestrictedSearchResults

 def unrestrictedSearchResults(self, REQUEST=None, **kw):
     """Calls ZSQLCatalog.searchResults directly without restrictions.
     """
     kw.setdefault('limit', self.default_result_limit)
     return ZCatalog.searchResults(self, REQUEST, **kw)
开发者ID:alvsgithub,项目名称:erp5,代码行数:5,代码来源:CatalogTool.py

示例5: __init__

 def __init__(self):
     ZCatalog.__init__(self, self.getId())
开发者ID:alvsgithub,项目名称:erp5,代码行数:2,代码来源:CatalogTool.py

示例6: __init__

 def __init__(self, id=None):
     ZCatalog.__init__(self, self.getId())
开发者ID:MarkTang,项目名称:erp5,代码行数:2,代码来源:InterpolationTool.py


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