TurboGears 2ΒΆ

In myapp/controllers/root.py, change the following line:

from tg import expose, flash, require, url

To:

from tg import expose, flash, require, url, validate

Inside the RootController class, add the following:

@expose()
@validate(form=movie_form, error_handler=movie)
def save_movie(self, **kw):
    return str(kw)

Also, update the existing movie method, change:

def movie(self):

to:

def movie(self, **kw):

Previous topic

TurboGears 1

Next topic

Pylons

This Page

Quick search