Django Chat cover image

Jazzband - Matthias Kestenholz

Django Chat

00:00

How to Manage a Tree Structure Efficiently With Django MPTT

Django MPTT modified pre-order tree traversal or in the literature I think it's also called nested set. It's just a way to add additional attributes to a model which should make querying a tree faster. These days if the tree isn't too big you should just add one parent foreign key to each model and then use recursive commentary expressions to fetch this data from the database. That was an idea I got actually from one of the guys so I don't know his name but it was a guy working on this cost.

Play episode from 23:41
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app