def to_python(self, value):
    Field.to_python(self, value)
    if (value is not None):
        try:
            return int(value)
        except ValueError as e:
            raise FieldValidationException(str(e))
    else:
        return None
def to_python(self, value):
    Field.to_python(self, value)
    if (value is not None):
        try:
            return int(value)
        except ValueError as e:
            raise FieldValidationException(str(e))
    else:
        return None