Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.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
Templates 跳过tornado中的服务器端渲染_Templates_Tornado - Fatal编程技术网

Templates 跳过tornado中的服务器端渲染

Templates 跳过tornado中的服务器端渲染,templates,tornado,Templates,Tornado,tornado模板引擎的语法是{{varName}},这与Angular的数据绑定语法碰巧匹配 有没有合适的方法跳过tornado模板引擎的服务器端渲染?使用新语法更改HTML文件将使项目混乱不堪。最简单的方法是不使用self.render。相反,请打开文件并使用self.write为其提供服务: 类MyRequestHandler…: def getself: 打开“path/to/template.html”作为f: self.writef.read 可能重复的

tornado模板引擎的语法是{{varName}},这与Angular的数据绑定语法碰巧匹配


有没有合适的方法跳过tornado模板引擎的服务器端渲染?使用新语法更改HTML文件将使项目混乱不堪。

最简单的方法是不使用self.render。相反,请打开文件并使用self.write为其提供服务:

类MyRequestHandler…: def getself: 打开“path/to/template.html”作为f: self.writef.read 可能重复的