The django-mptt app comes with a simple model administration mixin that allows you to create a tree structure and list it with indentation. To reorder trees, you need to either create this functionality yourself or use a third-party solution. One app that can help you to create a draggable administration interface for hierarchical models is django-mptt-admin. Let's take a look at it in this recipe.
Creating a category administration interface with django-mptt-admin
Getting ready
First, set up the categories app as described in the previous, Creating hierarchical categories with django-mptt recipe. Then, we need to install the django-mptt-admin app by performing the following steps:
- Install the app in your virtual environment...