node - Django-Components" > node - Django-Components" >
Skip to content

node ¤

Classes:

  • BaseNode –

    Shared behavior for our subclasses of Django's Node

BaseNode ¤

BaseNode(
    nodelist: Optional[NodeList] = None,
    node_id: Optional[str] = None,
    args: Optional[List[Expression]] = None,
    kwargs: Optional[RuntimeKwargs] = None,
)

Bases: Node

Shared behavior for our subclasses of Django's Node

Source code in src/django_components/node.py
def __init__(
    self,
    nodelist: Optional[NodeList] = None,
    node_id: Optional[str] = None,
    args: Optional[List[Expression]] = None,
    kwargs: Optional[RuntimeKwargs] = None,
):
    self.nodelist = nodelist or NodeList()
    self.node_id = node_id or gen_id()
    self.args = args or []
    self.kwargs = kwargs or RuntimeKwargs({})