'Validates that float() can be called on the input. Returns the result
of float(). Returns None for empty values.'

def to_python(self, value):

    value = super(IntegerField, self).to_python(value)
    if (value in validators.EMPTY_VALUES):
        return None
    if self.localize:
        value = formats.sanitize_separators(value)
    try:
        value = float(value)
    except (ValueError, TypeError):
        raise ValidationError(self.error_messages['invalid'])
    return value
