django-tree-queries icon indicating copy to clipboard operation
django-tree-queries copied to clipboard

Migration from django-mptt

Open claudep opened this issue 5 years ago • 2 comments

It would be so nice to find a "migrate from django-mptt" section in the docs!

claudep avatar Sep 15 '20 10:09 claudep

That's an excellent idea!

This is a related issue: https://github.com/matthiask/feincms3/issues/2

My current thinking is:

  • Add a position field
  • Set position = tree_id * 100000 + lft
  • Ensure that the model has ordering = ["position"] set in its class Meta:
  • Remove the MPTT fields

... and things should just work from there.

Now, I (or someone) should verify that this works and then write the docs for it.

matthiask avatar Sep 15 '20 16:09 matthiask

@matthiask hi, as i understand your idea i did it smth u can check #74.

CoderMungan avatar Aug 17 '24 22:08 CoderMungan