當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。