Skip to main content

WTForms extensions for Tornado.

Project description

WTForms extensions for Tornado.

Travis CI status Coveralls status Latest PyPI version Number of PyPI downloads


import tornado.ioloop
import tornado.web

from wtforms.fields import IntegerField
from wtforms.validators import Required
from wtforms_tornado import Form

class SumForm(Form):

    a = IntegerField(validators=[Required()])
    b = IntegerField(validators=[Required()])

class SumHandler(tornado.web.RequestHandler):
    def get(self):
        self.write("Hello, world")

    def post(self):
        form = SumForm(self.request.arguments)
        if form.validate():
            self.write(str(['a'] +['b']))
            self.write("" % form.errors)

application = tornado.web.Application([
    (r"/", SumHandler),

if __name__ == "__main__":


You can to use pip to install WTForms-Tornado:

$ pip install wtforms-tornado

Or using last source:

$ pip install git+git://

Or manually, download the latest source from PyPI:

$ tar xvzf wtforms-tornado-$VERSION.tar.gz
$ cd wtforms-tornado-$VERSION
$ python build
$ sudo python install

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for wtforms-tornado, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size wtforms-tornado-0.0.2.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page