Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/90.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在html中不显示变量_Html_Python 3.x_Flask - Fatal编程技术网

在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

所以我有一个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”, headline=iputithere) 
我在用iPhone。 现在,当直接返回变量时,它工作正常,所以我知道它不是空值。这是我不明白的。我试图返回的变量是一个字符串,但我也硬编码了一个字符串,以确保它仍然没有在html中返回。有什么理由吗

注意:我的h2标记未显示,我无法修复它。

您必须执行以下操作:

好的{{headline}

您正在传递来自
render_template
headline
变量中的值,因此必须使用
headline
而不是
Iputithere