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