Python AppEngine And HTML
I have a simple Hello World application in Python that i'm using with AppEngine, but i want to insert this in a HTML file, like this: I have a file called test.html and on it i have this snippet:
<center><img src="test.png></center>
// Here comes the Python App //
I want to put the output of the Python application in this space, like i can d开发者_开发知识库o with Servlets(Java).
Regards.
You should work through the getting started docs at the AppEngine site. Specifically around templates: http://code.google.com/appengine/docs/python/gettingstarted/templates.html.
Use the Django templates - the module comes built in with the app engine. I've used it here on line 42. The template used is here.
I would really recommend using a boilerplate template https://github.com/coto/gae-boilerplate This would give you the layout and template structure for developing useful and professional sites
精彩评论