Ticket #16570: 16570.diff
File 16570.diff, 2.9 KB (added by , 13 years ago) |
---|
-
AUTHORS
517 517 wam-djangobug@wamber.net 518 518 Wang Chun <wangchun@exoweb.net> 519 519 Filip Wasilewski <filip.wasilewski@gmail.com> 520 Dan Watson <http:// theidioteque.net/>520 Dan Watson <http://danwatson.net/> 521 521 Joel Watts <joel@joelwatts.com> 522 522 Lakin Wecker <lakin@structuredabstraction.com> 523 523 Chris Wesseling <Chris.Wesseling@cwi.nl> -
django/core/management/validation.py
66 66 mdigits_ok = True 67 67 except (ValueError, TypeError): 68 68 e.add(opts, mdigits_msg % f.name) 69 invalid_values_msg = '"%s": DecimalFields require a "max_digits" attribute value that is greater than the value of the "decimal_places" attribute.'69 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.' 70 70 if decimalp_ok and mdigits_ok: 71 if decimal_places > =max_digits:71 if decimal_places > max_digits: 72 72 e.add(opts, invalid_values_msg % f.name) 73 73 if isinstance(f, models.FileField) and not f.upload_to: 74 74 e.add(opts, '"%s": FileFields require an "upload_to" attribute.' % f.name) -
tests/modeltests/invalid_models/models.py
227 227 invalid_models.fielderrors: "decimalfield2": DecimalFields require a "max_digits" attribute that is a positive integer. 228 228 invalid_models.fielderrors: "decimalfield3": DecimalFields require a "decimal_places" attribute that is a non-negative integer. 229 229 invalid_models.fielderrors: "decimalfield3": DecimalFields require a "max_digits" attribute that is a positive integer. 230 invalid_models.fielderrors: "decimalfield4": DecimalFields require a "max_digits" attribute value that is greater than the value of the "decimal_places" attribute. 231 invalid_models.fielderrors: "decimalfield5": DecimalFields require a "max_digits" attribute value that is greater than the value of the "decimal_places" attribute. 230 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. 232 231 invalid_models.fielderrors: "filefield": FileFields require an "upload_to" attribute. 233 232 invalid_models.fielderrors: "choices": "choices" should be iterable (e.g., a tuple or list). 234 233 invalid_models.fielderrors: "choices2": "choices" should be a sequence of two-tuples.