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]
How to fix issue this below error
405 Method Not Allowed
The method POST is not allowed for this resource.