Assume I have this model :
class Task(models.Model):
title = models.CharField()
Now I would like that a task may be relates to another task. So I wanted to do this :
class Task(models.Model):
title = models.CharField()
relates_to = ForeignKey(Task)
however I have an error which states that Task is note defined.
Is this “legal” , if not, how should I do something similar to that ?
https://docs.djangoproject.com/en/dev/ref/models/fields/#foreignkey