#14030: Use F() objects in aggregates(), annotates() and values()
-------------------------------------+-------------------------------------
     Reporter:  delfick              |                    Owner:  jarshwah
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:  aggregate, annotate  |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by jarshwah):

 Yeah I can see the problem. As a workaround, you could manually set the
 output_field yourself:

 {{{ Sum('gross_income', output_field=models.DecimalField(max_digits=X,
 decimal_places=Y) }}}

 I'll think on how to fix this so that a workaround isn't necessary. Should
 probably bump this to a release blocker, but I'm not sure whether to open
 a new ticket for the regression or to track it here just yet.

--
Ticket URL: <https://code.djangoproject.com/ticket/14030#comment:55>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.60d05ce7443e99e31c96b4103541c42a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to