1👍
Use the .FOO_set
-manager:
var a = A.objects.get(id)
var b = a.b_set.all() # All related B objects to a
var c = a.c_set.all() # All related C objects to a
...etc
Source:stackexchange.com
1👍
Use the .FOO_set
-manager:
var a = A.objects.get(id)
var b = a.b_set.all() # All related B objects to a
var c = a.c_set.all() # All related C objects to a
...etc