Hi all,
Would appreciate some help on how to optimise the following piece of code.
I have two models, "invoice" and "invoice item". The invoice total is
calculated in invoice_total() by aggregation the sub_total and tax_total
from all invoice_items (see code below).
The problem I have is that
Hi all,
Would appreciate some advice on this, I'm having trouble working out the
best way to aggregate across multiple foreign key relationships. I have
come up with the solution below however I'm not sure if this is the correct
way to handle this situation. Any advice would be appreciated.
Th
dget__budge__in=
> self.budget_set.all()).aggregate(Sum('total'))['total__sum']
>
> try like this..!
>
> On Wed, Feb 1, 2017 at 7:14 PM, Patrick Joy > wrote:
>
>> Hi all,
>>
>> Would appreciate some advice on this, I'm having trouble working out
3 matches
Mail list logo