1
因此,進出口傳遞變量通過views.py如何獲得<img src="{% static "{{request_filename}}" %}" alt="My image"/>工作
return render_to_response(html, {'file': file})
到我的HTML
<img src="{% static "{{file}}" %}" alt="My image"/> working
但該文件沒有在我的HTML響應。有人可以幫幫我嗎。
像@GarethRees表示,文件已經在模板標籤範圍內都有效,所以不要使用括號也發表您實際的錯誤。 (html代碼) – 2013-04-06 09:39:56