4👍
I do not see any disadvantes using an app like django-mptt. In fact the methods provided by it are optimized to give you a maximum in performance when doing queries with hierarchical structures. No reason for me to worry about maintainability and/or performance and it is quite easy to use!
4👍
MPTT or treebeard may lead to lower performance? Nonsense. The whole point of these apps is that they provide highly optimised algorithms that massively increase performance. MPTT allows you to grab whole trees or sub-sections of them with a single database operation, which would otherwise need many separate calls.
- [Django]-Django-Tagging – count and ordering top "tags" (Is there a cleaner solution to mine?)
- [Django]-How to make email field required in the django user admin
- [Django]-Django model TimeField views.py cannot select hour or minute
- [Django]-Django – multiple models(table) in one view
- [Django]-Jquery mobile and dynamic page content
2👍
Using MPTT is there to make the system perform. When you implement it yourself, you may end up connecting the nodes together manually (a ~30 line function), or doing individual queries for all sublevels. Lots of manual work, been there, done that.
With the MPTT algorithm, a subtree can be fetched in one query.
It’s a common algorithm to store hierarchical data.
Django MPTT (especially v0.4) has some nice API’s to display all this data properly in the admin and templates. You don’t have to reinvent the wheel.
- [Django]-Django ImportError at / no matter what I do
- [Django]-Create HTML Mail with inline Image and PDF Attachment
- [Django]-PHP and Django: Nginx, FastCGI and Green Unicorn?
- [Django]-Django cache_page – prepopulate/pre-cache
- [Django]-How to download data from azure-storage using get_blob_to_stream