【发布时间】:2015-01-18 03:18:17
【问题描述】:
我知道这是一个微不足道的错误,但我无法调试它。
当我将标签放在引号中并为链接动态生成字符串时,不会生成“链接”。而是按原样呈现''。 (我正在尝试在 GAE 中运行一个使用 django 模板框架的 python 脚本)
以下是我的代码:
from google.appengine.ext.webapp import template
...
html = html + template.render('templates/footer.html',
{'links': 'Enter <a href="/">another sighting</a>.'})
以下是模板中的'footer.html':
<p>
{{ links }}
</p>
</body>
</html>
以下是输出:
任何帮助将不胜感激。 (Firefox 和 Google Chrome 都是这种情况)
【问题讨论】:
标签: python html django google-app-engine