How to do it...

Create an administration interface for the Category model from the ideas app that extends treebeard.admin.TreeAdmin instead of admin.ModelAdmin, as follows:

# ideas/admin.py
from django.contrib import admin
from treebeard.admin import TreeAdmin

from .models import Category

class CategoryAdmin(TreeAdmin):
list_display = ("title", "created", "modified",)
list_filter = ("created",)
admin.site.register(Category, CategoryAdmin)

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.42.168