Hi Steve,
thx for the hint with de debug toolbar, very nice.
It's working now,
greets ben
Steve Howell schrieb:
> On Nov 28, 8:36 am, Benjamin Wolf wrote:
>
>> Hi,
>>
>> I'm trying to create a query like this with django:
>> SELECT count(*) As total FROM `disposal` group by(salesman_id)
>>
>>
On Nov 28, 8:36 am, Benjamin Wolf wrote:
> Hi,
>
> I'm trying to create a query like this with django:
> SELECT count(*) As total FROM `disposal` group by(salesman_id)
>
> This gives me the number of total sales for every salesman.
> In django I tried this:
> data = Disposal.objects.annotate(tota
Hi,
I'm trying to create a query like this with django:
SELECT count(*) As total FROM `disposal` group by(salesman_id)
This gives me the number of total sales for every salesman.
In django I tried this:
data = Disposal.objects.annotate(total=Count('salesman'))
print str(x[0].total)
But total is
3 matches
Mail list logo