摘要:
方式一: ret = models.Book.objects.filter(authors__authordetail__telephone="123412351").values("title", "publish__name") print(ret) 方式二: ret = models.Auth 阅读全文
摘要:
一对多: 正向查询: # 一对多:正向查询,查询三国演义这本书的出版社的名字 values("关联字段名__要查询的字段") ret = models.Book.objects.filter(title="三国演义").values("publish__name") print(ret) # 查询到 阅读全文