feincms / django-tree-queries

Adjacency-list trees for Django using recursive common table expressions. Supports PostgreSQL, sqlite, MySQL and MariaDB.
https://django-tree-queries.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
415 stars 27 forks source link

feat(models): add the position field #3 #74

Closed CoderMungan closed 4 weeks ago

matthiask commented 4 weeks ago

Hi

Thanks for your contribution!

Not all tree siblings are ordered by a position field; tree siblings may also be ordered alphabetically by a name field or something completely different. So therefore I'm not going to merge this. Also, it wouldn't be backwards compatible with existing usage of tree queries.

However, maybe it would be useful to add a OrderedTreeNode abstract model or something, and that one could have a position field by default. Such a change would require some tests and docs though.

CoderMungan commented 4 weeks ago

I tried to go with what you had in mind. I tried to try without getting too much information, my mistake. But it was really very enjoyable. Thank you 🙏🥰 I'm closing the PR.