unfoldadmin / django-unfold

Modern Django admin theme for seamless interface development
https://unfoldadmin.com
MIT License
1.7k stars 171 forks source link

MPTTModelAdmin does not work with ModelAdmin #713

Closed YordanPetrovDS closed 1 month ago

YordanPetrovDS commented 1 month ago

MPTT admin does not compatible with django-unfold. Could you please help me to fix this? code:

from mptt.admin import MPTTModelAdmin
from unfold.admin import ModelAdmin, TabularInline
@admin.register(ProductCategory)
class ProductCategoryAdmin(MPTTModelAdmin, ModelAdmin):
    list_display = ("title", "parent", "display_attributes", "display_tax_groups")
    search_fields = ("title",)
    mptt_level_indent = 20
    list_filter = ("parent",)
    inlines = [ProductCategoryAttributesInline, ProductCategoryTaxGroupsInline]

result: image

lukasvinclav commented 1 month ago

Hi, this is duplicate of #366 so I'm closing this ticket.