【发布时间】:2011-05-01 03:19:59
【问题描述】:
我正在使用 django 生成 pdf 并将响应作为附件返回到视图中。
response = HttpResponse(mimetype='application/pdf')
response['Content-Disposition'] = 'attachment; filename=somefilename.pdf'
类似于文档(http://docs.djangoproject.com/en/dev/howto/outputting-pdf/#write-your-view)中描述的方式
重新加载页面的最佳方式是什么?
这没有成功(表单触发了 pdf 生成):
$('#the_form').submit(function(){
location.reload();
});
非常感谢, 丹尼
【问题讨论】:
标签: django pdf-generation reload