          self.max_digits, self.decimal_places = max_digits, decimal_places
          Field.__init__(self, verbose_name, name, **kwargs)
  
      def get_manipulator_field_objs(self):
          return [curry(oldforms.FloatField, max_digits=self.max_digits, decimal_places=self.decimal_places)]
  
  class ImageField(FileField):
      def __init__(self, verbose_name=None, name=None, width_field=None, height_field=None, **kwargs):
          self.width_field, self.height_field = width_field, height_field
          FileField.__init__(self, verbose_name, name, **kwargs)
 
</s> remove     def __init__(self, verbose_name=None, name=None, max_digits=None, decimal_places=None, **kwargs):
        self.max_digits, self.decimal_places = max_digits, decimal_places
        Field.__init__(self, verbose_name, name, **kwargs)
 </s> add  </s> remove         validator_list = [self.isValidFloat] + validator_list
        TextField.__init__(self, field_name, max_digits+2, max_digits+2, is_required, validator_list)
 </s> add         validator_list = [self.isValidDecimal] + validator_list 
        # Initialise the TextField, making sure it's large enough to fit the number with a - sign and a decimal point. 
        super(DecimalField, self).__init__(field_name, max_digits+2, max_digits+2, is_required, validator_list)  </s> remove     def isValidFloat(self, field_data, all_data):
        v = validators.IsValidFloat(self.max_digits, self.decimal_places)
 </s> add     def isValidDecimal(self, field_data, all_data): 
        v = validators.IsValidDecimal(self.max_digits, self.decimal_places) 
        return [oldforms.FloatField]

    def formfield(self, **kwargs):
        defaults = {'form_class': forms.FloatField}
        defaults.update(kwargs)
        return super(FloatField, self).formfield(**defaults)
          self.max_digits, self.decimal_places = max_digits, decimal_places
          Field.__init__(self, verbose_name, name, **kwargs)
  
      def get_manipulator_field_objs(self):
        return [oldforms.FloatField]

    def formfield(self, **kwargs):
        defaults = {'form_class': forms.FloatField}
        defaults.update(kwargs)
        return super(FloatField, self).formfield(**defaults)
  
  class ImageField(FileField):
      def __init__(self, verbose_name=None, name=None, width_field=None, height_field=None, **kwargs):
          self.width_field, self.height_field = width_field, height_field
          FileField.__init__(self, verbose_name, name, **kwargs)
keep keep keep keep replace keep keep keep keep keep
 Fixed #2365, #3324 -- Renamed FloatField to DecimalField and changed the code
to return Decimal instances in Python for this field. Backwards incompatible
change.

Added a real FloatField (stores floats in the database) and support for
FloatField and DecimalField in newforms (analogous to IntegerField).

Included decimal.py module (as django.utils._decimal) from Python 2.4. This is
license compatible with Django and included for Python 2.3 compatibility only.

Large portions of this work are based on patches from Andy Durdin and Jorge
Gajon.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@5302 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/db/models/fields/__init__.py