【发布时间】:2017-07-12 10:51:28
【问题描述】:
我有使用 Flask python 呈现的网页。在该页面中,我使用了一个 json 文件,其数据将根据搜索条件发生变化。我将 json 文件放在一个静态文件夹中。问题是,json 数据更改没有反映在浏览器中。
d3.json("{{ url_for( 'static', filename='data/Emails_export_sql.json') }}", function(graph) {
force
.nodes(graph.nodes)
.links(graph.links)
.start();
}
我尝试将 json 文件保存在“静态”文件夹以外的文件夹中。但它不会起作用。 json文件需要保存在哪里?
【问题讨论】:
-
可以尝试在您的 html 标题中添加
<meta http-equiv="cache-control" content="no-cache" />
标签: python-3.x flask