mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 00:19:53 +03:00
Updated docs to include normalize option on DecimalField
This commit is contained in:
parent
7c1414c45d
commit
963bdc78b0
|
@ -281,6 +281,7 @@ Corresponds to `django.db.models.fields.DecimalField`.
|
|||
- `min_value` Validate that the number provided is no less than this value.
|
||||
- `localize` Set to `True` to enable localization of input and output based on the current locale. This will also force `coerce_to_string` to `True`. Defaults to `False`. Note that data formatting is enabled if you have set `USE_L10N=True` in your settings file.
|
||||
- `rounding` Sets the rounding mode used when quantising to the configured precision. Valid values are [`decimal` module rounding modes][python-decimal-rounding-modes]. Defaults to `None`.
|
||||
- `normalize` Will normalize the decimal value. This will strip all trailing zeroes and change the value's precision to the minimum required precision to be able to represent the value without loosing data. Defaults to `False`.
|
||||
|
||||
#### Example usage
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user