stackoverflow answers: model.objects.values()
actually queryset.values() is still query set, in essence, more close to list
check if a queryset is empty is django,
if not queryset.values():
print("query set empty")
the same as to check if a list is empty
网友评论