mirror of
https://github.com/django/django.git
synced 2025-07-19 03:05:32 +00:00
Fixed #7726 -- Added validation of max_digits and decimal_places options to DecimalField model field. Thanks theevilgeek for the report and elbarto for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
1517659693
commit
a43c2f50c2
3 changed files with 16 additions and 2 deletions
|
@ -437,11 +437,12 @@ A fixed-precision decimal number, represented in Python by a
|
|||
|
||||
.. attribute:: DecimalField.max_digits
|
||||
|
||||
The maximum number of digits allowed in the number
|
||||
The maximum number of digits allowed in the number. Note that this number
|
||||
must be greater than ``decimal_places``, if it exists.
|
||||
|
||||
.. attribute:: DecimalField.decimal_places
|
||||
|
||||
The number of decimal places to store with the number
|
||||
The number of decimal places to store with the number.
|
||||
|
||||
For example, to store numbers up to 999 with a resolution of 2 decimal places,
|
||||
you'd use::
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue