def render(self, data, accepted_media_type=None, renderer_context=None):
        if isinstance(data, dict):
            data = [data]
        zipname = '%s.%s' % (self.arcdirname, self.format)
        self.set_filename(zipname, renderer_context)
        fp = tempfile.TemporaryFile(suffix='.%s' % self.format)
        with zipfile.ZipFile(fp, mode='w') as zf:
            for item in data:
                arcname = os.path.join(self.arcdirname, self.basename(item))
                io = item['image']
                try:
                    zf.writestr(arcname, io.read())
                except __HOLE__:
                    zf.write(io, arcname=arcname)
                else:
                    io.close()
        self.set_response_length(fp.tell(), renderer_context)
        fp.seek(0)
        return fp
dataset/ETHPy150Open bkg/django-spillway/spillway/renderers/gdal.py/GeoTIFFZipRenderer.render