Replies: 1 comment
-
Here's what I used in my models.py:
This will allow you to set a default to a precision of 2 decimals places. But, you can set it to a greater precision used the named argument 'precision'. You will need to do the same thing for QuantityFormField, if you want the same in a form. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm just now starting out how to modify/create custom widgets. It will take awhile. Right now, my work is trying to learn how to format the scientific notation being stored in the DB from a "converted" unit into less decimal points.
If I put in Liters, and the display is in Gallons, I would get a number to the 10th decimal. Looking to rounding the number for display.
Beta Was this translation helpful? Give feedback.
All reactions