Here calling a view within another view but I can not use its result. When attempting to use that data which gives the following result in the terminal,
Response status_code=200, "text/html; charset=utf-8">
view
class CourseFilterView(ResponseViewMixin, mixins.ListModelMixin, mixins.RetrieveModelMixin, viewsets.GenericViewSet):
serializer_class = CourseFilterSerializer
queryset = Course.objects.all()
class CourseFilterListView(ResponseViewMixin, APIView):
def get(self, request, *args, **kwargs):
response_data = {}
a = CourseFilterView.as_view({'get': 'list'})(request._request, *args, **kwargs)
response_data['a'] = a
print('a', a)
Am I following the right path? If not, give me a solution to make it better