Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Extensible, hierarchical, and pluggable navigation system for Django sites

Project Description

Build Status


An extensible, hierarchical, and pluggable navigation system for Django sites.

django-treenav was designed from the start to live independent of a CMS implementation. As a separate application, treenav can easily be integrated into existing, custom setups and does not enforce or require users to use a particular content management system.

Sharing the same principles, django-pagelets integrates seamlessly with treenav and can be used together to create a flexible CMS product.

For complete documentation checkout,


  • Generic functionality with multiple URL specifications: get_absolute_url(), reverse(), or raw URLs
  • Packaged with templates to render the tree hierarchy with nested <ul>’s, but can easily be overridden with custom templates
  • Useful CSS classes for flexible UI customization
  • Automatically sets “active” on item and item’s parents if PATH_INFO is equal to item.href
  • Efficient: minimizes database access with django-mptt functionality
  • Caches the tree so that repeated page views do not hit the database.
  • Simple links in the MenuItem list view for refreshing the cache and href from the database.


Using the demo

For a quick demo, follow these steps:

$ mkvirtualenv django-treenav
(django-treenav)$ git clone git://
(django-treenav)$ cd django-treenav/
(django-treenav)~/django-treenav$ python develop
(django-treenav)~/django-treenav$ cd sample_project/
(django-treenav)~/django-treenav/sample_project$ pip install -r requirements.txt
(django-treenav)~/django-treenav/sample_project$ ./ migrate
(django-treenav)~/django-treenav/sample_project$ ./ runserver

Visit http://localhost:8000/ in your browser and follow the instructions.


  1. Install the app with pip:

    pip install django-treenav
  2. Add to your INSTALLED_APPS and run migrate:

  3. Include these context processors:

        'OPTIONS': {
          'context_processors': [
  4. Add these urls:

    urlpatterns = [
        url(r'^treenav/', include('treenav.urls')),

Development sponsored by Caktus Consulting Group, LLC.

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(23.0 kB) Copy SHA256 Hash SHA256
Wheel 2.7 Dec 14, 2016
(17.5 kB) Copy SHA256 Hash SHA256
Source None Dec 14, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers