              self.validators.append(MinValueValidator(self.min_value, message=message))
  
      def to_internal_value(self, data):
          """
          Validates that the input is a decimal number. Returns a Decimal
          instance. Returns None for empty values. Ensures that there are no more
          than max_digits in the number, and no more than decimal_places digits
          after the decimal point.
          """
          data = smart_text(data).strip()
          if len(data) > self.MAX_STRING_LENGTH:
              self.fail('max_string_length')
  
 
</s> remove         context = decimal.getcontext().copy()
        context.prec = self.max_digits
        quantized = value.quantize(
            decimal.Decimal('.1') ** self.decimal_places,
            context=context
        )
 </s> add         quantized = self.quantize(value)

        Validate that the input is a decimal number and return a Decimal
        instance.
              self.validators.append(MinValueValidator(self.min_value, message=message))
  
      def to_internal_value(self, data):
          """
        Validate that the input is a decimal number and return a Decimal
        instance.
        Validate that the input is a decimal number and return a Decimal
        instance.
        Validate that the input is a decimal number and return a Decimal
        instance.
        Validate that the input is a decimal number and return a Decimal
        instance.
          """
          data = smart_text(data).strip()
          if len(data) > self.MAX_STRING_LENGTH:
              self.fail('max_string_length')
  
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Refactored DecimalField to allow easier subclassing 
rest_framework/fields.py