本文整理汇总了Python中Products.ZSQLCatalog.ZSQLCatalog.ZCatalog.searchResults方法的典型用法代码示例。如果您正苦于以下问题:Python ZCatalog.searchResults方法的具体用法?Python ZCatalog.searchResults怎么用?Python ZCatalog.searchResults使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Products.ZSQLCatalog.ZSQLCatalog.ZCatalog
的用法示例。
在下文中一共展示了ZCatalog.searchResults方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: searchResults
# 需要导入模块: from Products.ZSQLCatalog.ZSQLCatalog import ZCatalog [as 别名]
# 或者: from Products.ZSQLCatalog.ZSQLCatalog.ZCatalog import searchResults [as 别名]
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)
示例2: unrestrictedSearchResults
# 需要导入模块: from Products.ZSQLCatalog.ZSQLCatalog import ZCatalog [as 别名]
# 或者: from Products.ZSQLCatalog.ZSQLCatalog.ZCatalog import searchResults [as 别名]
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)