def get_nodes(self, request):
    '\n        This method is used to build the menu tree.\n        '
    nodes = []
    docsmap_file = os.path.join(settings.SPHINX_DOCS_ROOT, 'docsmap.json')
    if (not os.path.exists(docsmap_file)):
        return nodes
    with io.open(docsmap_file) as fh:
        docs_map = json.load(fh, encoding='utf-8')
    for (counter, items) in enumerate(docs_map.items(), 1):
        bits = items[0].split('/')
        if (((len(bits) == 1) and (bits[0] == 'index')) or ((len(bits) == 2) and (bits[1] != 'index'))):
            continue
        node = NavigationNode(title=items[1], url=reverse_lazy('sphinx-documentation', args=(bits[0],)), id=counter)
        nodes.append(node)
    return nodes
This method is used to build the menu tree.
def get_nodes(self, request):
    '\n        \n        '
    nodes = []
    docsmap_file = os.path.join(settings.SPHINX_DOCS_ROOT, 'docsmap.json')
    if (not os.path.exists(docsmap_file)):
        return nodes
    with io.open(docsmap_file) as fh:
        docs_map = json.load(fh, encoding='utf-8')
    for (counter, items) in enumerate(docs_map.items(), 1):
        bits = items[0].split('/')
        if (((len(bits) == 1) and (bits[0] == 'index')) or ((len(bits) == 2) and (bits[1] != 'index'))):
            continue
        node = NavigationNode(title=items[1], url=reverse_lazy('sphinx-documentation', args=(bits[0],)), id=counter)
        nodes.append(node)
    return nodes