This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from model_utils.managers import InheritanceManagerMixin, InheritanceQuerySetMixin | |
from treebeard.mp_tree import MP_NodeManager, MP_NodeQuerySet, MP_Node | |
class PolymorphicTreeQuerySet(InheritanceQuerySetMixin, MP_NodeQuerySet): | |
"""QuerySet combining functionality of polymorphic up-casting with Materialized Path tree structure""" | |
class PolymorphicTreeManager(InheritanceManagerMixin, MP_NodeManager): | |
_queryset_class = PolymorphicTreeQuerySet |
NewerOlder