Cómo obtener datos de múltiples tablas en Django
from App.models import Student, Subject
def myFunc():
students = Student.objects.all()
for student in students:
subj = student.subject.sub
def myFunc2():
subjects = Subject.objects.all()
for subject in subjects:
student_name = subject.student.nm
Enthusiastic Eagle