See these cookbook recipes for ideas:
http://code.djangoproject.com/wiki/CookBookCategoryDataModel
http://code.djangoproject.com/wiki/ModifiedPreorderTreeTraversal

I use a custon template tag to make a tree-like navigation menu by
turning the tree into a straight list with depth information on each
item. My tree structure comes from Flatpages URLs though and not a
recursive model. Anyway I thought it's wise to do all the complex stuff
(be it recursion or otherwise) in Python in the view and have the
template deal with just a straight list.

Reply via email to