03 – Google App Engine for Python – HTML & Form Parameters

In this video I output HTML as a string and I read form parameters.

 

main.py source code

[crayon lang="python"]
import webapp2

html = “”"< !doctype html>



Account Details






“”"

class MainHandler(webapp2.RequestHandler):
def get(self):
self.response.out.write(html)

def post(self):
firstName = self.request.get(“firstName”)
familyName = self.request.get(“familyName”)
self.response.out.write(“First Name: ” + firstName
+ ” Family Name: ” + familyName)

app = webapp2.WSGIApplication([('/', MainHandler)],
debug=True)
[/crayon]

1 comment to 03 – Google App Engine for Python – HTML & Form Parameters

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>