= I'm learning python with book "Learn python by the hard way" I'm doing the web exercise, but i cant found a concret information.
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)
then... in my "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>
well, i cant access to the action="/hello".
but i can acces with action="/" well i dont know wich is the reason
Someone could explain me?
Aucun commentaire:
Enregistrer un commentaire