To create hierarchical menu's, the first thing I thought about was
some kind of parent child relation on just one table but then you have
to submit many queries. A better approach wil be the Modified Preorder
Tree Traversal. See:
http://www.sitepoint.com/print/hierarchical-data-database

On the Django site you can find an example at:
http://code.djangoproject.com/wiki/ModifiedPreorderTreeTraversal

I'm still experimenting but I use one table to store some kind of
collection (id, content_type, object_id) so I can relate to different
types of content (tables)

After saving content -say a book- I run _post_save to add the book to
the collection.

For the menu itself I create a table, containing the collection_id and
the fields for ordering (lft, rgt)

This is just a startingpoint but I hope it will help you on the run.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to