def _preprocess_fields(form):
    for field in form.fields:
        name = form.fields[field].widget.__class__.__name__.lower()
        if not name.startswith("radio") and not name.startswith("checkbox"):
            try:
                form.fields[field].widget.attrs["class"] += " form-control"
            except __HOLE__:
                form.fields[field].widget.attrs["class"] = " form-control"
    return form
dataset/ETHPy150Open mgaitan/waliki/waliki/templatetags/bootstrap_tags.py/_preprocess_fields