Automatically round Django's DecimalField according to the max_digits and decimal_places attributes
This snippet allows you to use a new field type, RoundedDecimalField, that will automatically round any value affected to it according to the max_digits and decimal_places attributes. You will no longer receive validation errors if you use a float or a decimal with too many decimal digits.
- field
- decimal