1.all()
>>> Class.objects.filter(stu_related__sname='test002').all()
<QuerySet [<Class: 开发班>]>
2.values()
>>> Class.objects.filter(stu_related__sname='test002').values()
<QuerySet [{'id': 1, 'cname': '开发班', 'cdata': datetime.date(2020, 10, 17)}]>
>>> Class.objects.filter(stu_related__sname='test002').values("id","cname","cdata")
<QuerySet [{'id': 1, 'cname': '开发班', 'cdata': datetime.date(2020, 10, 17)}]>
3.vlaues_list()
>>> Class.objects.filter(stu_related__sname='test002').values_list("id","cname","cdata")
<QuerySet [(1, '开发班', datetime.date(2020, 10, 17))]>
4.count()
>>> Class.objects.filter(stu_related__sname='test002').count()
1
这几个方法object 对象是没有的