import colander
import deform

from csrf import CSRFSchema

class LoginForm(CSRFSchema):
    """The user login form."""
    username = colander.SchemaNode(colander.String(),
            title="Username",
            widget=deform.widget.TextInputWidget(css_class='form-control'),
            )
    password = colander.SchemaNode(colander.String(),
            title="Password",
            validator=colander.Length(min=5),
            widget=deform.widget.PasswordWidget(size=20,
                css_class='form-control'),
            )


@@ -24,16 +24,55 @@
 deform%0A%0A
+from schemaform import SchemaFormMixin%0A
 from csr
@@ -118,16 +118,33 @@
 RFSchema
+, SchemaFormMixin
 ):%0A    %22
@@ -252,16 +252,104 @@
 ername%22,
+%0A%0A    __buttons__ = (deform.form.Button(name=_(%22Submit%22), css_class='btn btn-primary'),)
 %0A       

Add SchemaFormMixin to the LoginForm