from pony.main import *

class MyForm(Form):
    first_name = Text(required=True)
    last_name = Text()
    age = Text()
    def validate(self):
        if self.age.value:
            try: int(self.age.value)
            except ValueError:
                self.age.error_text = 'Must be number!'
    def on_submit(self):
        print self.first_name.value, self.last_name.value, self.age.value

@http('/')
@printhtml
def index():
    f = MyForm()
    print f
    
start_http_server()

@@ -20,16 +20,36 @@
 rt *%0D%0A%0D%0A
+use_autoreload()%0D%0A%0D%0A
 class My

Add use_autoreload() to example