📌  相关文章
📜  如何从 django 中的多个表中获取数据 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:20.344000             🧑  作者: Mango

代码示例1
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