django model relation definition
- by Laurent Luce
Hello,
Let say I have 3 models: A, B and C with the following relations.
A can have many B and many C.
B can have many C
Is the following correct:
class A(models.Model):
...
class B(models.Model):
...
a = ForeignKey(A)
class C(models.Model):
...
a = ForeignKey(A)
b = ForeignKey(B)