1 from django
.conf
import settings
2 from django
.db
import models
6 class TestModel(models
.Model
):
7 value
= models
.IntegerField(null
=True)
8 value2
= models
.IntegerField(null
=True)
9 class TestModelChild(models
.Model
):
10 value
= models
.IntegerField(null
=True)
11 value2
= models
.IntegerField(null
=True)
12 parent
= models
.ForeignKey(TestModel
, null
=True)
13 class TestModelChildChild(models
.Model
):
14 value
= models
.IntegerField(null
=True)
15 value2
= models
.IntegerField(null
=True)
16 parent
= models
.ForeignKey(TestModelChild
, null
=True)