Posts

Showing posts with the label django-rest-framework

Heroku caching api responses [django/restframework]

Heroku caching api responses [django/restframework] Heroku seams to be caching api responses from my Django/RestFramework app. I have no caching mechanism enabled on restframework. Looking at the logs, I can see a error response (400) caused by a object not found, and, right before, the python stacktrace. Then I populate the object table and here happens the issue. On next requests, que error doesn't happen anymore, but the response is exactly the same 400 as before! Eventually, I get alternate 200/400 responses. Edit 1: When I get 400 response, it's not just the code, but also the body. My code throws no error, but the response is code 400 and the first error message. Edit 2: Added bellow my view and my serializer, with not relevant parts ommited The log with error: 2018-06-29T11:34:45.991094+00:00 app[web.1]: INFO 2018-06-29 08:34:45,990 dados: 1 [1/1] 6.34 Kb AGUARDANDO: importação síncrona iniciada 2018-06-29T11:34:46.044547+00:00 app[web.1]: UF Destino AC 2018-06-29T11:3...