如何减去两个Django查询的结果?

2024-04-25 04:44:35 发布

您现在位置:Python中文网/ 问答频道 /正文

在我的视图.py在

def reset(request):

    Result = [(Contact.objects.all().count()] - [(Subscriber.objects.all().count()]
    return HttpResponse(Result)

我想减去这两个查询,但没用。。。。。在


Tags: py视图returnobjectsrequestdefcountcontact