Example #1
0
 def finalize_response(self, request, response, *args, **kwargs):
     response = super(BaseRasterView, self).finalize_response(
         request, response, *args, **kwargs)
     # Use streaming responses for GDAL formats.
     if isinstance(response.accepted_renderer,
                   renderers.gdal.BaseGDALRenderer):
         headers = response._headers
         response = StreamingHttpResponse(response.rendered_content)
         response._headers = headers
     return response