On my EC2 instance, which is running Nginx and Gunicorn, I also have several json files in a directory. I ultimately want DRF to be able to return a Response object with the specified json file located in this directory.
Here is what I think I should do: When a user clicks something, the onClick method will call fetch() and I will pass, say, 'api/jsonfiles' as well as the number of the file I want. urls.py will have path('api/jsonfiles/', views.JsonFileGetter). In the class JsonFileGetter within views.py, I am wondering how I can access retrieve the requested file and return a Response object containing the data?