📜  查询集列出python代码示例

📅  最后修改于: 2022-03-11 14:47:10.051000             🧑  作者: Mango

代码示例1
from .models import Article

articles = Article.objects.all()

# This will return a queryset type
print(type(articles))

# Convert articles queryset to a python's list type
articles_list = list(articles)

# This will return a list type
print(type(articles_list))