#32592: Add places argument to Round database function.
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: nobody
Type: New | Status: assigned
feature |
Component: Database | Version: dev
layer (models, ORM) | Keywords: database function,
Severity: Normal | round, decimal places
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
For whatever reason
[https://github.com/django/django/pull/9622#discussion_r165426686 this
review comment] was never followed up on and `Round()` doesn't support
providing a second argument for the number of places to round to.
This is frustrating as it rather limits the use of `Round()`.
All core backends support both a single and two- argument form of
`ROUND()`. The second argument is the number of decimal places to round
to. All backends, other than SQLite, also support a negative integer being
provided here for rounding to the left of the decimal point.
--
Ticket URL: <https://code.djangoproject.com/ticket/32592>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.3305b7e8fc01fe2b91f987c23d9fd58d%40djangoproject.com.