django queryset to dict?
2017-10-05 本文已影响0人
AtrributeError
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