#10972: Use Expressions with Annotations
-------------------------------------+-------------------------------------
               Reporter:  me@…       |          Owner:
                   Type:  New        |         Status:  new
  feature                            |      Component:  ORM aggregation
              Milestone:             |       Severity:  Normal
                Version:  SVN        |       Keywords:  expression
             Resolution:             |  aggregation aggregates annotation
           Triage Stage:  Accepted   |      Has patch:  1
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  1          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
Changes (by ramiro):

 * ui_ux:   => 0
 * easy:   => 0


Old description:

> It would be nice if expressions could be used inside annotations,  i.e.
> to perform something like the following:
>
> Customer.objects.annotate('total_purchased':
> Sum(F('customer__order__lineitem__quantity') *
> F('customer__order__lineitem__price')))

New description:

 It would be nice if expressions could be used inside annotations,  i.e. to
 perform something like the following:

 {{{
 Customer.objects.annotate('total_purchased':
 Sum(F('customer__order__lineitem__quantity') *
 F('customer__order__lineitem__price')))
 }}}

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/10972#comment:13>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to