cubicweb/web/views/wdoc.py
branch3.26
changeset 12331 3cddf6a5473a
parent 12330 6e620df7d4c3
child 12332 45f9d93bba71
equal deleted inserted replaced
12330:6e620df7d4c3 12331:3cddf6a5473a
    56 
    56 
    57 def get_insertion_point(section, index):
    57 def get_insertion_point(section, index):
    58     if section.attrib.get('insertafter'):
    58     if section.attrib.get('insertafter'):
    59         snode = index[section.attrib['insertafter']]
    59         snode = index[section.attrib['insertafter']]
    60         node = snode.parent
    60         node = snode.parent
    61         idx = node.getchildren().index(snode) + 1
    61         idx = list(node).index(snode) + 1
    62     elif section.attrib.get('insertbefore'):
    62     elif section.attrib.get('insertbefore'):
    63         snode = index[section.attrib['insertbefore']]
    63         snode = index[section.attrib['insertbefore']]
    64         node = snode.parent
    64         node = snode.parent
    65         idx = node.getchildren().index(snode)
    65         idx = node.getchildren().index(snode)
    66     elif 'appendto' in section.attrib:
    66     elif 'appendto' in section.attrib: