wtforms/wtforms — pull request #27 by kageurufu (2013-10-23 22:47:38+00:00)
Title: Assigning form attributes and properties at class creation

This is a patch that will allow you to assign properties or attributes to a form at form writing time

It is used as such:

class MyForm(Form):
pattern = TextField(attributes={'pattern': r'[\d]+'}, properties=['required'])

and that would generate

This way, you don't end up with template code riddled with form.pattern(pattern = '[\d]+') all over the place.