I have defined a database model in which a task object has a relationship to the same task object.
class Task(models.Model): id = models.AutoField(primary_key