コード例 #1
0
def queryRoot(wfile, req, sort):
    wlib = store.getWeblib()

    # category pane
    categoryList = _buildCategoryList(wlib)

    # upgrade_info
    upgrade_info = upgrade_checker.pollUpgradeInfo()

    # webitem pane
    webItems = map(WebItemNode, query_wlib.queryRoot(wlib))

    renderer = WeblibRenderer(wfile)
    if sort:
        renderer.cookie['weblib_sort'] = sort
    renderer.setLayoutParam(None)
    renderer.output(
        '/weblib',
        wlib.tags,
        None,
        wlib.getDefaultTag(),
        categoryList,
        upgrade_info,
        sort,
        webItems,
        )
コード例 #2
0
def queryRoot(wfile, req):
    wlib = store.getWeblib()

    # category pane
    categoryList = _buildCategoryList(wlib)

    # webitem pane
    webItems = map(WebItemNode, query_wlib.queryRoot(wlib))

    renderer = WeblibRenderer(wfile)
    renderer.setLayoutParam(None)
    renderer.output(
        wlib.tags,
        None,
        wlib.getDefaultTag(),
        categoryList,
        webItems)
コード例 #3
0
 def test_queryRoot(self):
     wlib = self.store.wlib
     result = query_wlib.queryRoot(wlib)
     self.assertEqual(result, [])    # nothing match no tag