should use by default Response instead of render_to_response for query performance on drf.
Issue #30
closed
#Response() for tracking queries performance on django debug toolbar
django_datatables_view/mixins.py
class JSONResponseMixin(object):
def get(self, request, args, *kwargs):
.......................
#dump = json.dumps(response, cls=LazyEncoder)
#return self.render_to_response(dump)
return Response(response)
I tested with this code and it works fine as works as before (append /?format=json will result in json on DRF browsable api. but in my fronted code I don't need to append.).
Comments (2)
-
repo owner -
repo owner - changed status to closed
Closing due to lack of response from reporter.
- Log in to comment
This is not clear to me. Where from is Response? What is the issue with DjangoDebugToolbar?