I have a viewset like the follwing
class DummyViewSet:
def create(self, request, *args, **kwargs):
variable_a = 5
return another_api_end_point(request, variable_a) ---> request.data: {"a":"value1", "b": "value2"}
@api_view(['POST'])
another_api_end_point(request, variable_a)
print(request.data) ---> request.data: {}
print(variable_a) ---> variable_a: 5
return "Some Response"
Why I can able to see variable_a's value as it is but request.data as empty in other endpoint?
Debugging it for hours now.
If anyone knows the reason for it, please revert. It would be a great help.