在html中不显示变量
所以我有一个HTML模板,它应该在HTML中显示文本,但当然,它没有。我的HTML是这样的:在html中不显示变量,html,python-3.x,flask,Html,Python 3.x,Flask,所以我有一个HTML模板,它应该在HTML中显示文本,但当然,它没有。我的HTML是这样的: If “success” in my other function: Return render_template(“index.html”, headline=iputithere) 好的{{Iputithere} 烧瓶是这样的: If “success” in my other function: Return render_template(“index.html”, head
If “success” in my other function:
Return render_template(“index.html”, headline=iputithere)
好的{{Iputithere}
烧瓶是这样的:
If “success” in my other function:
Return render_template(“index.html”, headline=iputithere)
我在用iPhone。
现在,当直接返回变量时,它工作正常,所以我知道它不是空值。这是我不明白的。我试图返回的变量是一个字符串,但我也硬编码了一个字符串,以确保它仍然没有在html中返回。有什么理由吗
注意:我的h2标记未显示,我无法修复它。您必须执行以下操作:
好的{{headline}
您正在传递来自render_template
的headline
变量中的值,因此必须使用headline
而不是Iputithere