Пример #1
0
def collection_browse():
    if cache.get('collection-browse') is None:
        sq = SidebarBuilder()
        cache.set('collection-browse', sq.get_collections(), 500)
    return {'collections':cache.get('collection-browse'), 'collection_count':len(cache.get('collection-browse'))}
Пример #2
0
def genre_browse():
    if cache.get('sidebar-browse') is None:
        sq = SidebarBuilder()
        cache.set('sidebar-browse',sq.get_facets(), 500)
    # print type(cache.get('sidebar-browse'))
    return { 'browseables' : cache.get('sidebar-browse') }