diff --git a/AUTHORS b/AUTHORS
index b64a627..3e4d185 100644
a
|
b
|
answer newbie questions, and generally made Django that much better:
|
525 | 525 | wam-djangobug@wamber.net |
526 | 526 | Wang Chun <wangchun@exoweb.net> |
527 | 527 | Filip Wasilewski <filip.wasilewski@gmail.com> |
528 | | Dan Watson <http://theidioteque.net/> |
| 528 | Dan Watson <http://danwatson.net/> |
529 | 529 | Joel Watts <joel@joelwatts.com> |
530 | 530 | Lakin Wecker <lakin@structuredabstraction.com> |
531 | 531 | Chris Wesseling <Chris.Wesseling@cwi.nl> |
diff --git a/django/core/management/validation.py b/django/core/management/validation.py
index 3cb2e34..3aaeaa9 100644
a
|
b
|
def get_validation_errors(outfile, app=None):
|
72 | 72 | mdigits_ok = True |
73 | 73 | except (ValueError, TypeError): |
74 | 74 | e.add(opts, mdigits_msg % f.name) |
75 | | invalid_values_msg = '"%s": DecimalFields require a "max_digits" attribute value that is greater than the value of the "decimal_places" attribute.' |
| 75 | invalid_values_msg = '"%s": DecimalFields require a "max_digits" attribute value that is greater than or equal to the value of the "decimal_places" attribute.' |
76 | 76 | if decimalp_ok and mdigits_ok: |
77 | | if decimal_places >= max_digits: |
| 77 | if decimal_places > max_digits: |
78 | 78 | e.add(opts, invalid_values_msg % f.name) |
79 | 79 | if isinstance(f, models.FileField) and not f.upload_to: |
80 | 80 | e.add(opts, '"%s": FileFields require an "upload_to" attribute.' % f.name) |
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index a5d66f8..e0cf92f 100644
a
|
b
|
A fixed-precision decimal number, represented in Python by a
|
450 | 450 | .. attribute:: DecimalField.max_digits |
451 | 451 | |
452 | 452 | The maximum number of digits allowed in the number. Note that this number |
453 | | must be greater than ``decimal_places``, if it exists. |
| 453 | must be greater than or equal to ``decimal_places``, if it exists. |
454 | 454 | |
455 | 455 | .. attribute:: DecimalField.decimal_places |
456 | 456 | |
diff --git a/tests/modeltests/invalid_models/invalid_models/models.py b/tests/modeltests/invalid_models/invalid_models/models.py
index 422d70f..93c1c66 100644
a
|
b
|
invalid_models.fielderrors: "decimalfield2": DecimalFields require a "decimal_pl
|
243 | 243 | invalid_models.fielderrors: "decimalfield2": DecimalFields require a "max_digits" attribute that is a positive integer. |
244 | 244 | invalid_models.fielderrors: "decimalfield3": DecimalFields require a "decimal_places" attribute that is a non-negative integer. |
245 | 245 | invalid_models.fielderrors: "decimalfield3": DecimalFields require a "max_digits" attribute that is a positive integer. |
246 | | invalid_models.fielderrors: "decimalfield4": DecimalFields require a "max_digits" attribute value that is greater than the value of the "decimal_places" attribute. |
247 | | invalid_models.fielderrors: "decimalfield5": DecimalFields require a "max_digits" attribute value that is greater than the value of the "decimal_places" attribute. |
| 246 | invalid_models.fielderrors: "decimalfield4": DecimalFields require a "max_digits" attribute value that is greater than or equal to the value of the "decimal_places" attribute. |
248 | 247 | invalid_models.fielderrors: "filefield": FileFields require an "upload_to" attribute. |
249 | 248 | invalid_models.fielderrors: "choices": "choices" should be iterable (e.g., a tuple or list). |
250 | 249 | invalid_models.fielderrors: "choices2": "choices" should be a sequence of two-tuples. |