(form_class)
return new_form_class
Take a normal form and return a subclass of that form that replaces all
    django widgets with the corresponding floppyforms widgets.
Take a normal form and return a subclass of that form that replaces all
    django widgets with the corresponding floppyforms widgets.
Take a normal form and return a subclass of that form that replaces all django widgets with the corresponding floppyforms widgets .
def floppify_form(form_class):
    '''
    Take a normal form and return a subclass of that form that replaces all
    django widgets with the corresponding floppyforms widgets.
    '''
    new_form_class = type(form_class.__name__, (form_class,), {})
    for field in new_form_class.base_fields.values():
        field.widget = floppify_widget(field.widget, field=field)
    return new_form_class
def floppify_form ( form_class ) : new_form_class = type ( form_class . __name__ , ( form_class , ) , { } ) for field in new_form_class . base_fields . values ( ) : field . widget = floppify_widget ( field . widget , field = field ) return new_form_class