'Boolean field constructor
@param tablename: the table name
@param row: the s3_field Row
@return: the Field instance'

@staticmethod
def _boolean_field(tablename, row):

    fieldname = row.name
    fieldtype = row.field_type
    default = row.default_value
    if default:
        default = default.lower()
        if (default == 'true'):
            default = True
        elif (default == 'none'):
            default = None
        else:
            default = False
    else:
        default = False
    settings = (row.settings or {})
    widget = settings.get('widget')
    if (widget == 'radio'):
        T = current.T
        requires = [IS_IN_SET(OrderedDict([(True, T('Yes')), (False, T('No'))]), error_message=T('Please    select    a    value')), (lambda v: ((str(v) == 'True'), None))]
        widget = (lambda field, value: SQLFORM.widgets.radio.widget(field, value, cols=2))
    else:
        requires = None
        widget = None
    from s3utils import s3_yes_no_represent
    field = Field(fieldname, fieldtype, default=default, represent=s3_yes_no_represent, requires=requires)
    if widget:
        field.widget = widget
    return field
