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 
    <input id="pattern" name="pattern" pattern="[\d]+" required="required" type="text" value="">

This way, you don't end up with template code riddled with form.pattern(pattern = '[\d]+') all over the place.