diff --git a/django/forms/fields.py b/django/forms/fields.py
index 146a10d..eab33e9 100644
a
|
b
|
class IntegerField(Field):
|
240 | 240 | Validates that int() can be called on the input. Returns the result |
241 | 241 | of int(). Returns None for empty values. |
242 | 242 | """ |
| 243 | value = value.strip() |
243 | 244 | value = super(IntegerField, self).to_python(value) |
244 | 245 | if value in self.empty_values: |
245 | 246 | return None |
… |
… |
class FloatField(IntegerField):
|
271 | 272 | Validates that float() can be called on the input. Returns the result |
272 | 273 | of float(). Returns None for empty values. |
273 | 274 | """ |
| 275 | value = value.strip() |
274 | 276 | value = super(IntegerField, self).to_python(value) |
275 | 277 | if value in self.empty_values: |
276 | 278 | return None |