[Answered ]-Problem using django mptt

1👍

Django-mptt does not support multiple types of object in the same tree. You could have Financial and Company both inherit from the same parent class, and then build the tree out of instances of that parent class. You’d need to store a “content type” field on the parent class so you can cast instances of the parent class to the proper subclass. This is a gross hack though, as it violates the spirit of inheritance. A Financial is not a Company, it’s an attribute of a Company. The correct answer is to fix your ACL design so you can use a ForeignKey.

1👍

I recommend django-polymorphic_tree

👤thanos

Leave a comment