|
__init__(self,
tablename=None,
hierarchy=None,
represent=None,
filter=None,
leafonly=True)
Constructor |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
link(self)
The name of the link table containing the foreign key, or None if the
foreign key is in the hierarchical table itself |
source code
|
|
|
|
|
left(self)
The left join with the link table containing the foreign key |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
delete(self,
node_ids,
cascade=False)
Recursive deletion of hierarchy branches |
source code
|
|
|
add(self,
node_id,
parent_id=None,
category=None)
Add a new node to the hierarchy |
source code
|
|
|
|
|
|
|
|
|
children(self,
node_id,
category=DEFAULT,
classify=False)
Get child nodes of a node |
source code
|
|
|
path(self,
node_id,
category=DEFAULT,
classify=False)
Return the ancestor path of a node |
source code
|
|
|
root(self,
node_id,
category=DEFAULT,
classify=False)
Get the root node for a node. |
source code
|
|
|
|
|
siblings(self,
node_id,
category=DEFAULT,
classify=False,
inclusive=False)
Get the sibling nodes of a node. |
source code
|
|
|
findall(self,
node_id,
category=DEFAULT,
classify=False,
inclusive=False)
Find descendant nodes of a node |
source code
|
|
|
|
|
json(self,
root=None,
represent=None,
max_depth=None)
Represent the hierarchy as JSON-serializable dict |
source code
|
|
|
html(self,
widget_id,
root=None,
represent=None,
hidden=True,
none=None,
_class=None)
Render this hierarchy as nested unsorted list |
source code
|
|
|
export_node(self,
node_id,
prefix="_hierarchy",
depth=None,
level=0,
path=None,
hcol=None,
columns=None,
data=None,
node_list=None)
Export the hierarchy beneath a node |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|