예제 #1
0
 def pack( self ):
     from MaKaC.common.contribPacker import ZIPFileHandler,RegistrantPacker
     p=RegistrantPacker(self._conf)
     path=p.pack(self._list, ZIPFileHandler())
     filename = "registrants.zip"
     cfg = Config.getInstance()
     mimetype = cfg.getFileTypeMimeType( "ZIP" )
     self._rh._req.set_content_length(os.path.getsize(path))
     self._rh._req.content_type = """%s"""%(mimetype)
     self._rh._req.headers_out["Content-Disposition"] = """inline; filename="%s\""""%filename
     self._rh._req.sendfile(path)
예제 #2
0
 def pack( self ):
     from MaKaC.common.contribPacker import ZIPFileHandler,RegistrantPacker
     p=RegistrantPacker(self._conf)
     path=p.pack(self._list, ZIPFileHandler())
     filename = "registrants.zip"
     cfg = Config.getInstance()
     mimetype = cfg.getFileTypeMimeType( "ZIP" )
     self._rh._req.set_content_length(os.path.getsize(path))
     self._rh._req.content_type = """%s"""%(mimetype)
     self._rh._req.headers_out["Content-Disposition"] = """inline; filename="%s\""""%filename
     self._rh._req.sendfile(path)
예제 #3
0
 def pack(self):
     from MaKaC.common.contribPacker import ZIPFileHandler, RegistrantPacker
     p = RegistrantPacker(self._conf)
     path = p.pack(self._list, ZIPFileHandler())
     return send_file('registrants.zip', path, 'ZIP', inline=False)
예제 #4
0
 def pack(self):
     from MaKaC.common.contribPacker import ZIPFileHandler, RegistrantPacker
     p = RegistrantPacker(self._conf)
     path = p.pack(self._list, ZIPFileHandler())
     return send_file('registrants.zip', path, 'ZIP', inline=False)