#7726: DecimalField: Semantics of max_digits in combination with decimal_places
confusing and perhaps wrong
----------------------------------+-----------------------------------------
Reporter: theevilgeek | Owner: nobody
Status: new | Milestone:
Component: Validators | Version: SVN
Resolution: | Keywords: DecimalField
Stage: Accepted | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
----------------------------------+-----------------------------------------
Changes (by mtredinnick):
* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* needs_tests: => 0
* needs_docs: => 0
Comment:
It should be a validation error if `max_digits < decimal_places +1`. That
is, this would be an error detected when you run `manage.py validate`.
That's all that's required here. There will be at least one digit
(possibly an implicit zero) to the left of the decimal point.
A patch to add that check to the validation routines in
`django.core.management` will be most welcome. Thanks for taking the time
to work through this.
--
Ticket URL: <http://code.djangoproject.com/ticket/7726#comment:1>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---