def get_parent_id(node):
    if node.is_root():
        return 0
    return node.get_parent().pk
Return the node's parent id or 0 if node is a root node.
dataset/ETHPy150Open tabo/django-treebeard/treebeard/templatetags/admin_tree.py/get_parent_id