0
= 我正在學習python的書籍」學習python的硬性方法「 我正在做web練習,但我無法找到一個concret信息。python web.py HTTP/1.1 GET /「-404 Not Found
import web
urls =('/hello', 'Index')
app = web.application(urls,globals())
render = web.template.render(<mypath>)
class Index(object):
def GET(self):
return render.hello_form()
def POST(self):
form = web.input(name="Nobody", greet="Hello")
greeting = "%s, %s" %(form.greet, form.name)
return render.index(greeting = greeting)
然後......在我的 「hello_form」
<form action="/hello" method="POST">
A greeting <input type=text" name="greet">
<br/>
Your Name: <input type="text" name="name">
<br/>
<input type="submit>
</form>
好,我不能進入行動= 「/你好」。
但我可以acces與行動=「/」以及我不知道這是什麼原因
有人能解釋我嗎?