Welcome to Django Mptt Demo

Welcome to Django mptt demo module. This demo explains how to create tree level category and demonstrate mtpp library

Repo : https://bitbucket.org/cyberkishor/django-mptt-demo/wiki/Home

Screen Shot 2015-09-05 at 17.24.01 category-list-admin

Django Mtpp demo features

  • Create Tree level category
  • Display tree level category list in admin panel
  • Display category as tree in another db relation like forenkeyTree (example used in product model)

This demo demonstrate use of django-mptt model.

Have a try here:

 

Requirements

  • django-mptt

Here’s an example of some Python code:

Now Copy and Paste inside admin.py

Now inside view.py

And now you need to setup template for display hierarchy inside the template:

Leave a Reply

Your email address will not be published. Required fields are marked *