Modified Preorder Tree Traversal on the Wiki
I added an article at the Wiki about Modified Preorder Tree Traversal, a way to store parent/children relationship. I don't know how good my english is (I am from Brazil, and speak portuguese), and I extracted the code from an app I am doing. Could someone "proof-read" it please, and if any errors are found, please let me know? Many thanks, -- Julio Nobrega - http://www.inerciasensorial.com.br
Re: Modified Preorder Tree Traversal on the Wiki
Someone forgot the link... :) http://code.djangoproject.com/wiki/ModifiedPreorderTreeTraversal
Re: Modified Preorder Tree Traversal on the Wiki
> I added an article at the Wiki about Modified Preorder Tree > Traversal, a way to store parent/children relationship. Lots of thanks. I'm just wanted to implemented too (: Would be nice to see that implemented in model base class.
Re: Modified Preorder Tree Traversal on the Wiki
Yeah, this weekend I will have time to code with Django and I am planning to decouple the Comment model and functions I did, because I need it on another project. Look for an updated wiki in a few days if you want something easier to use... On 2/1/06, Alex Bondarenko <[EMAIL PROTECTED]> wrote: > > I added an article at the Wiki about Modified Preorder Tree > > Traversal, a way to store parent/children relationship. > Lots of thanks. I'm just wanted to implemented too (: > > Would be nice to see that implemented in model base class. > -- Julio Nobrega - http://www.inerciasensorial.com.br
Re: Modified Preorder Tree Traversal on the Wiki
On Wednesday 01 February 2006 12:14, Julio Nobrega wrote: > I added an article at the Wiki about Modified Preorder Tree > Traversal, a way to store parent/children relationship. You use 'lft' and 'rght' instead of 'left' and 'right' - I don't think there is any need to do this. You can always quote them, and Django will do that automatically for you. And regardless, you can use 'db_column' so that in your Python code they are 'left' and 'right' even if they are different in the DB - see http://www.djangoproject.com/documentation/model_api/ Regards, Luke -- I never hated a man enough to give him his diamonds back. (Zsa Zsa Gabor) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/