from django.http import FileResponse def download(request): if..... file=open([path],'rb') response=FileResponse(file) response['Content-Type'] = 'application/octet-stream' response['Content-Disposition'] = 'attachment;filename="[filename].xls"'
return response
django 实现下载功能
猜你喜欢
转载自www.cnblogs.com/wang666/p/9214551.html
今日推荐
周排行