本文整理汇总了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)
示例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)
示例3: unrestrictedCountResults
def unrestrictedCountResults(self, REQUEST=None, **kw):
"""Calls ZSQLCatalog.countResults directly without restrictions.
"""
return ZCatalog.countResults(self, REQUEST, **kw)
示例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)
示例5: __init__
def __init__(self):
ZCatalog.__init__(self, self.getId())
示例6: __init__
def __init__(self, id=None):
ZCatalog.__init__(self, self.getId())