this is the code that crashes:

code.py:

import web
app = web.auto_application()
render = web.template.render('templates/')
login_form = web.form.Form( web.form.Textbox("login"),
web.form.Password("password"))
class login(app.page):
    def GET(self):
        return render.login(login_form())
if __name__ == "__main__":
    app.run()

templates/login.html:

$def with (login_form)
<form method="post" enctype="multipart/form-data" action="">
  $:login_form.render()
  <p><input type="submit" value="Enter" /></p>
</form>


1. if i change "return render.login(login_form())" to "return
render.login(login_form)" - then i get no errors

2. if i change it to "return
render.login(login_form({'login':'admin','password':'admin'}))" -
Python app crashes with Bus Error

3. if i change it to

login_form.validates({'login':'admin','password':'admin'})
return render.login(login_form)

then i get no errors


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to