Yes it is possible.
However, there’s a lot more to this topic. If you’re working with any kind of tree structure implemented in a relational database, you will want to consider a more robust implementation of your models.
At a minimum, you’ll want to look at django-treebeard, django-mptt, and django-treenode.
Also see the texts and links at: