http://0.0.0.0:8080/
127.0.0.1:50100 - - [09/May/2008 19:00:44] "HTTP/1.1 GET /" - 200 OK
127.0.0.1:50100 - - [09/May/2008 19:00:53] "HTTP/1.1 GET /signup" -
405 Method Not Allowed
templates/signup.html
<p>Signup</p>
<form method=post>
user: <input type="text" name="username" /><br />
pass: <input type="text" name="password" /><br />
<input type="submit" value="submit" /><br />
</form>
main.html
<p>Hi!</p>
import web
render = web.template.render('templates/')
urls = (
'/', 'main',
'/signup', 'signup',
)
class main:
def GET(self):
print render.main()
class signup:
def POST(self):
print render.signup() SHOULD I AHVE THIS HERE OR
NOT? EEOR ANYHOW.
i = web.input()
# username post info
user = i.username
# username post info
password = i.password
print user
# database stuff here to save the new user.
web.webapi.internalerror = web.debugerror
if __name__ == "__main__": web.run(urls, globals())
i dont get through the examplesa nd tutorial how POST renders the html-
page.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---