q = models.UserInfo.objects.all() select * from userinfo select * from userinfo inner join usertype on ... for row in q: print(row.name,row.ut.title) select_related: 查询主动做连表 q = models.UserInfo.objects.all().select_related('ut','gp') select * from us…