In myapp/controllers/, add the following line:

from tw.mods.pylonshf import validate

Inside the RootController class, add the following:

@validate(form=movie_form, error_handler=index)
def save(self, **kw):
    return str(kw)

Also, update the existing movie method, change:

def movie(self):


def movie(self, **kw):

Change the form definition so action is movie/save instead of save_movie. TBD: restructure the tutorial so this fits more neatly

Previous topic

TurboGears 2

Next topic

TurboGears 1

This Page

Quick search