1

所以我通过views.py传递一个变量

return  render_to_response(html, {'file': file})

进入我的html

<img src="{% static "{{file}}" %}" alt="My image"/> working

但是该文件在我的 html 中没有响应。有人可以帮帮我吗。

4

1 回答 1

1

代替

{% static "{{file}}" %}

写吧

{% static file %}
于 2013-04-06T09:37:29.397 回答