示例#1
0
def get_element(request, element_id):
    element = Widget.get(element_id)
    if element is None:
        raise Http404()
    else:
        return element
示例#2
0
def get_direct_element_children(node):
    from megacms.basewidgets.widgetmodels import Widget
    return (Widget.all()
            .filter('element_parent =', node.key())
            .order('element_order')
            .fetch(limit=None))