美文网首页
django queryset to dict?

django queryset to dict?

作者: AtrributeError | 来源:发表于2017-10-05 08:37 被阅读0次

    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

    相关文章

      网友评论

          本文标题:django queryset to dict?

          本文链接:https://www.haomeiwen.com/subject/xuyhyxtx.html