code: def json_response(data, status=200, serializer=None):
      
      return HttpResponse(json.dumps(data, default=serializer),
                          status=status,
                          content_type='application/json; charset=UTF-8')
docs: Returns an HttpResponse object containing JSON serialized data.
  
      The mime-type is set to application/json, and the charset to UTF-8.