Changes between Initial Version and Version 1 of Ticket #20930, comment 6
- Timestamp:
- Aug 20, 2013, 1:52:15 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #20930, comment 6
initial v1 8 8 9 9 {{{ 10 Xyz.objects.values('user').annotate(total_a=Sum('a'), total_b=Sum('b')).values( F('total_a')/F('total_b')*100)10 Xyz.objects.values('user').annotate(total_a=Sum('a'), total_b=Sum('b')).values('user', ratio_percent=F('total_a')/F('total_b')*100) 11 11 }}} 12 12 13 **But**, in case of `aggregate` this wont work as `aggregate` returns `dict` (not `QuerySet`). So, I guess some changes are required for `aggregate`. 13 **But**, in case of `aggregate` this wont work as `aggregate` returns `dict` (not `QuerySet`). So, I guess some changes are required for `aggregate`. Also, both functionalities (operations on aggregates and passing F objects to aggregates) can co-exist (as I think).