Django-navigen is a project mainly written in Python, based on the MIT license.
Provides navigation components for more-dynamic django sites.
This application provides components that simplify the creation of dynamic navigation menus in django. You can use to to have django automatically generate menus with menu items that reflect the permissions of the currently logged in user.
Just like other django apps, django-navigen is really easy to get started with. Simply install it with:
python setup.py install
After this is installed, open up your project's settings.py file and add 'navigen' to your INSTALLED_APPS.
INSTALLED_APPS = (
# Your other apps listed here
'navigen',
)
Now, as a final step - have django synchronize your database:
./manage.py syncdb
You should now have all that you need to use django-navigen within your application. In order to test this it is good to know the terminology used by the navigation system or you might be confused or think that the application is overly complicated. However, remember that django-navigen was made with the following goals in mind:
These are established by organizing each menu as a "navigation tree", and relating each tree's top-level "menu items" to a navigation tree. A tree is accessed by your template by it's "access name", and multiple trees can make use of the same "menu item" when necessary.
Trees are represented in django's ORM with the NavigationTree model. This model is fairly simple, and only contains the following properties:
Leaves in the tree are represented by the NavigationItem model which describes a single link that can be assigned to a tree, and can also be assigned to a parent menu item for dropdowns.