0
我想在Google应用引擎的HTML页面中使用Form post方法或ajax post方法,但似乎没有发生任何事情。在HTML页面上形成POST方法
class Email(webapp2.RequestHandler):
def post(self):
'''
Post method to handle Email requests.
'''
print self.request
self.response.write(self.request)
app = webapp2.WSGIApplication([('/', MainPage),("/email",Email)],
debug=True)
<form method="post" action="http://localhost:8080/email" >
<p>
<label for="byour_name">Your name</label><input type="text" name="byour_name" value="" id="byour_name">
</p>
<p>
<label for="byour_email_address">Your email address</label><input type="text" name="byour_email_address" value="" id="byour_email_address">
</p>
<p>
What's on your mind?<br>
<textarea name="Message" rows="10" cols="25">
</textarea>
</p>
<p>
<input type="submit" value="Send it!">
</p>
可一些帮助,这我也尝试Wireshark来检查网络活动,但什么也没发生..
但是,如果我申报内我的app.py文件,那么它的工作是。但是,如果我尝试从我的index.html中声明的表单发布它不起作用 –
您是否尝试过使用相对路径而不是绝对路径? – 2013-04-01 16:07:52
但两者都没有发生...... –