KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have this model with a self referencing Foreign Key relation: class Person(TimeStampedModel): name = models.CharField(max_length=32) parent = models.ForeignKey('self', null=True, blank=True, related_name='children') Now I want to get all the multi level children for a person. How do I write a Django query for it? It needs to behave like recursive function.
Tags (comma-separated)
Save Edits
Cancel