I have a tree structure in memory that I would like to render in HTML using a Django template.
class Node():
name = "node name"
children = []
There will be some object root
that is a Node
, and children
is a list of Node
s. root
will be passed in the content of the template.
I have found this one discussion of how this might be achieved, but the poster suggests this might not be good in a production environment.
Does anybody know of a better way?