Example #1
0
def empty_listing(*things):
    parent_name = None
    for t in things:
        try:
            parent_name = t.parent_name
            break
        except AttributeError:
            continue
    l = Listing(None, None, parent_name = parent_name)
    l.things = list(things)
    return Wrapped(l)
Example #2
0
def empty_listing(*things):
    parent_name = None
    for t in things:
        try:
            parent_name = t.parent_name
            break
        except AttributeError:
            continue
    l = Listing(None, None, parent_name = parent_name)
    l.things = list(things)
    return Wrapped(l)
Example #3
0
def add_child_listing(parent, *things):
    l = Listing(None, nextprev=None)
    l.things = list(things)
    parent.child = Wrapped(l)
    parent_name = parent._fullname if not parent.deleted else "deleted"
    parent.child.parent_name = parent_name
Example #4
0
def add_child_listing(parent, *things):
    l = Listing(None, nextprev=None)
    l.things = list(things)
    parent.child = Wrapped(l)
    parent_name = parent._fullname if not parent.deleted else "deleted"
    parent.child.parent_name = parent_name