【发布时间】:2017-08-11 12:19:55
【问题描述】:
filter和get有什么区别
>>> Question.objects.filter(id=1)
<QuerySet [<Question: What's new?>]>
>>> Question.objects.get(pk=1)
<Question: What's new?>
【问题讨论】:
-
正如文档所解释的,QuerySet 是实例的集合。什么让你困惑?
标签: python django django-models