Suppose
@login_required()
def GetFollowers(request, id):
obj = Follow.objects.filter(following_id=id)
serializer = SearchSerializer(obj, many=True)
result = JsonResponse(serializer.data, safe=False)
return result
I am using django rest framework. When I hit an api endpoint suppose (localhost:8000/api/v1/myfollowers) i get a json result which is ok but not getting django-debug-toolbar. When i raise(Http404) instead of returning JSON result, django debug toolbar is visible.
How do i fix this? A way i got to know was printing queries but i cant use that as i will have to add same lines to every function.
Thanks in Advance!