Skip to content

Commit aed8387

Browse files
glarraintomchristie
authored andcommitted
docs: Fix description of DecimalField's max_digits (encode#4714)
As of PR encode#4377, `max_digits=None` is allowed for `DecimalField`.
1 parent 1e09886 commit aed8387

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/api-guide/fields.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ Corresponds to `django.db.models.fields.DecimalField`.
261261

262262
**Signature**: `DecimalField(max_digits, decimal_places, coerce_to_string=None, max_value=None, min_value=None)`
263263

264-
- `max_digits` The maximum number of digits allowed in the number. Note that this number must be greater than or equal to decimal_places.
264+
- `max_digits` The maximum number of digits allowed in the number. It must be either `None` or an integer greater than or equal to `decimal_places`.
265265
- `decimal_places` The number of decimal places to store with the number.
266266
- `coerce_to_string` Set to `True` if string values should be returned for the representation, or `False` if `Decimal` objects should be returned. Defaults to the same value as the `COERCE_DECIMAL_TO_STRING` settings key, which will be `True` unless overridden. If `Decimal` objects are returned by the serializer, then the final output format will be determined by the renderer. Note that setting `localize` will force the value to `True`.
267267
- `max_value` Validate that the number provided is no greater than this value.

0 commit comments

Comments
 (0)