Once you have created categories in your app, you need to display them hierarchically in a template. The easiest way to do this with MPTT trees, as described in the Creating hierarchical categories with django-mptt recipe, is to use the {% recursetree %} template tag from the django-mptt app. We will show you how to do that in this recipe.
Rendering categories in a template with django-mptt
Getting ready
Make sure you have the categories and ideas apps. There, your Idea model should have many-to-many relation to the Category model, as per the Creating hierarchical categories with django-mptt recipe. Enter some categories in the database.