Convert Schematics Models to WTForms
from schematics.models import Model
from schematics.types.base import StringType, IntType
from schematics_wtf.converter import model_form
class Test(Model):
pk = StringType(required=True)
name = StringType()
age = IntType()
country = StringType(default='US', choices=['US','UK'])
test = Test(dict(name="Dude",age=35,pk="saweet")))
TestForm = model_form(test, hidden=['pk'])
form = TestForm()
print form.name.label
print form.name()
returns
<label for="name">name</label>
<input id="name" name="name" type="text" value="Dude">