using two foreign key of same model django code example
Example: django foreign key to same
class Task(models.Model):
title = models.CharField()
relates_to = models.ForeignKey('self')
class Task(models.Model):
title = models.CharField()
relates_to = models.ForeignKey('self')