Python AppEngine和HTML

时间:2009-10-12 17:49:31

标签: python html integrate

我在Python中有一个简单的Hello World应用程序,我正在使用AppEngine,但我想将其插入HTML文件中,如下所示:我有一个名为test.html的文件,我有这个片段:

<center><img src="test.png></center>
// Here comes the Python App //

我想把Python应用程序的输出放在这个空间中,就像我可以用Servlets(Java)做的那样。

问候。

3 个答案:

答案 0 :(得分:4)

您应该在AppEngine网站上查看入门文档。特别是围绕模板: http://code.google.com/appengine/docs/python/gettingstarted/templates.html

答案 1 :(得分:2)

使用Django模板 - 该模块内置了app引擎。我在第42行使用了它here。使用的模板是here

答案 2 :(得分:1)

我真的建议使用样板模板     https://github.com/coto/gae-boilerplate 这将为您提供开发有用和专业网站的布局和模板结构