I use django-mptt
in my projects when I have some sort of Tree architecture.
MPTT is a technique for storing hierarchical data in a database. The
aim is to make retrieval operations very efficient.
The trade-off for this efficiency is that performing inserts and
moving items around the tree is more involved, as there's some extra
work required to keep the tree structure in a good state at all times.
--- From the README
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…