【发布时间】:2013-10-16 09:45:20
【问题描述】:
我的 django web 应用程序制作并保存 docx,我需要使其可下载。
我使用简单的render_to_response,如下所示。
return render_to_response("test.docx", mimetype='application/vnd.ms-word')
但是,它会引发类似'utf8' codec can't decode byte 0xeb in position 15: invalid continuation byte的错误
我无法将此文件作为静态文件提供,因此我需要找到一种方法将其作为静态文件提供。 非常感谢您的帮助。
【问题讨论】:
-
也许这会有所帮助link
标签: python django python-docx