def to_python(self, value):
    Field.to_python(self, value)
    if (value in [True, False]):
        return value
    elif (str(value).strip().lower() in ['true', 't', '1']):
        return True
    elif (str(value).strip().lower() in ['false', 'f', '0']):
        return False
    raise FieldValidationException(("The value of '%s' for the '%s' parameter is not a valid boolean" % (str(value), self.name)))
def to_python(self, value):
    Field.to_python(self, value)
    if (value in [True, False]):
        return value
    elif (str(value).strip().lower() in ['true', 't', '1']):
        return True
    elif (str(value).strip().lower() in ['false', 'f', '0']):
        return False
    raise FieldValidationException(("The value of '%s' for the '%s' parameter is not a valid boolean" % (str(value), self.name)))