That's a very naive question which means that I don't understand something very basic about how DRF works, but still: What is the way get a response from DRF in a form of text file containing json?
I have a ListAPIView:
class MyModelJSONView(generics.ListAPIView):
serializer_class = MySerializer
queryset = MyModel.objects.all()
I guess I should re-write the get
method of this ListAPIView
somehow to get a text file (I assume by adding Content-Disposition
to a response. But how?