Oops!
Of course the code under "def get(self):" should be indented
accordingly.
= = = = = = = = = =
How about this (assumes you have the "helloworld.html" stored in the
"templates" subfolder of where your code is)
for main.py:
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
from google.appengine.ext.webapp import template
class MainHandler(webapp.RequestHandler):
def get(self):
template_values = { 'textMessage': 'Hello World', }
path = os.path.join(os.path.dirname(__file__), 'templates/
helloworld.html')
self.response.out.write(template.render(path, template_values))
def main():
application = webapp.WSGIApplication([('/', MainHandler)],
debug=True)
util.run_wsgi_app(application)
if __name__ == '__main__':
main()