[Answer]-Get parent id in django-mptt

1👍

If your nodes are MPTTModels then you should have a ‘parent’ relationship to ‘self’. Assuming that is the case, you should be able to get the parent id by doing:

node.parent.id

Leave a comment