Django Rest查询集运行两次

时间:2016-11-05 12:35:35

标签: django django-rest-framework

嗨为什么Django调用此查询设置了两次?

 class AccountListView(ListCreateAPIView):

            serializer_class = AccountSerializer

            def get_queryset(self):
                print 'get query set'

                return Accounts.objects.filter(user=self.request.user)

0 个答案:

没有答案