因此,我正在使用Django,并尝试使用githubs嵌入的GIST将用户GIST动态添加到页面中
这是循环
{% for i in snippets %}
<div class="tile is-4">
<div style="height:25vh;"><script src="https://gist.github.com/{{i.owner.login}}/{{i.id}}.js"/></div>
</div>
{% endfor %}
im循环遍历的列表包含两项,但只添加了第一项。 但是,如果我沿着这些线做一些事情,它会正确地显示两个不同的id
{% for i in snippets %}
{{i.id}}
{% endfor %}
我读到github脚本调用document.write()
,我有一种直觉,这就是我的问题所在
document.write()
会打破我的循环吗
目前没有回答
相关问题 更多 >
编程相关推荐