1
我对GAE中的模板渲染有一个问题。我想导入一个文本文件并将其写入一个html文件。在这个文本文件中,我使用了html符号来标记新行新的段落。它适用于webapp。但是,相同的表达式不适用于webapp2。所以请给我一些建议。GAE Django webapp2模板渲染
谢谢!
import webapp2
text_file2 = open('text1.txt','r')
x = text_file2.read()
html = html + template.render(templatepath + 'A.html', {'model_attributes':'Overview','text_paragraph':x})
感谢您的帮助亚当它的工作! – 2012-02-28 21:34:04