[Django] #32592: Add places argument to Round database function.

5 views
Skip to first unread message

Django

unread,
Mar 24, 2021, 6:23:58 PM3/24/21
to django-...@googlegroups.com
#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.

Django

unread,
Mar 24, 2021, 6:31:21 PM3/24/21
to django-...@googlegroups.com
#32592: Add places argument to Round database function.
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: database function, | Triage Stage:
round, decimal places | Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Nick Pope):

* owner: nobody => Nick Pope
* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/14178 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/32592#comment:1>

Django

unread,
Mar 25, 2021, 1:05:12 AM3/25/21
to django-...@googlegroups.com
#32592: Add places argument to Round database function.
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: New feature | Status: closed

Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: duplicate

Keywords: database function, | Triage Stage:
round, decimal places | Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: assigned => closed
* resolution: => duplicate


Comment:

Duplicate of #31487.

--
Ticket URL: <https://code.djangoproject.com/ticket/32592#comment:2>

Django

unread,
Mar 25, 2021, 4:34:03 AM3/25/21
to django-...@googlegroups.com
#32592: Add places argument to Round database function.
-------------------------------------+-------------------------------------
Reporter: Nick Pope | Owner: Nick Pope
Type: New feature | Status: closed
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: duplicate
Keywords: database function, | Triage Stage:
round, decimal places | Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Nick Pope):

Sorry for the duplicate, my search in Trac came up with nothing.

--
Ticket URL: <https://code.djangoproject.com/ticket/32592#comment:3>

Reply all
Reply to author
Forward
0 new messages