2
To get all C
from given A
:
a = A()
list_of_c = a.c_set.all()
and get A
from given C
:
c = C()
a = c.a
The reference has an own section about Many-to-one-relationships.
Source:stackexchange.com
2
To get all C
from given A
:
a = A()
list_of_c = a.c_set.all()
and get A
from given C
:
c = C()
a = c.a
The reference has an own section about Many-to-one-relationships.