Creating a category administration interface with django-mptt-tree-editor
If you want to use the common functionality of the change list, such as columns, admin actions, editable fields, or filters, in your administration interface as well as manipulate the tree structure in the same view, you need to use another third-party app called django-mptt-tree-editor
. Let's see how to do that.
Getting ready
First, we need to have the django-mptt-tree-editor
app installed. Perform the following steps:
- To start, install the app in your virtual environment using the following command:
(myproject_env)$ pip install django-mptt-tree-editor
- Then, put it in
INSTALLED_APPS
in the settings, as follows:# conf/base.py or settings.py INSTALLED_APPS = ( # ... "mptt_tree_editor" ...
Get Web Development with Django Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.