[Answered ]-Django get base model from parent model

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.

Leave a comment