jinja2.nodes.Node.set_ctx

Node.set_ctx(ctx)[source]

Reset the context of a node and all child nodes. Per default the parser will all generate nodes that have a ‘load’ context as it’s the most common one. This method is used in the parser to set assignment targets and other nodes to a store context.