filter(id__in=models.Teacher.objects.all()[0:5])
teacher_list = models.Teacher.objects.filter(id__in=models.Teacher.objects.all()[0:5]).values(‘id‘, ‘name‘, ‘cls__id‘, ‘cls__caption‘)
原文地址:https://www.cnblogs.com/jiefangzhe/p/10773478.html
时间: 2024-10-11 16:51:53