我想将我使用docutils完成的所有文档下载到某种格式(html,pdf等)有没有办法轻松完成?
答案 0 :(得分:0)
是
以下是一个例子:
response = HttpResponse(content_type="application/ms-excel")
response['Content-Disposition'] = 'attachment; filename=excel.xls'
它将以excel格式提供名为excel.xls的附件供您下载