Replies: 1 comment
-
I've made a major update to the package. By default, queries now return results sorted by parent (with For the Django admin interface, sorting is handled within the admin panel itself rather than at the model level. This keeps queries more efficient while still ensuring a structured display where needed. I'm also working on integrating additional sorting mechanisms, either as separate utility functions or as optional parameters in API method calls. This should provide more flexibility without imposing unnecessary overhead. Let me know if you have specific scenarios in mind where ordering behavior could be further optimized! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @TimurKady ,
I would like to do further enhancements to the package and would appreciate your thoughts on whether we should keep ordering in the Django manager as the default behavior, or if it should be an option users can choose.
For example, in my use case, I typically don't need ordering when retrieving items like
children, siblings, descendants
, etc., except when working with the tree in the Django admin. Currently, users can disable the default ordering usingqs.order_by()
. An alternative approach would be to add a separate manager specifically for cases where ordering is needed, keeping things simple by default.What are your thoughts on this approach?
References:
django-fast-treenode/treenode/managers.py
Line 61 in e23b9f8
Beta Was this translation helpful? Give feedback.
All reactions