try:
Readers =
Readers.objects.values_list('organization').order_by().distinct().
and see if that works. I haven't had a chance to test it but if you
have an order_by in the model it cocks up distinct queries. By putting
in the order_by within the query you clear it. It's also mentioned in
the do
This is still an issue I'm seeing. I don't know how it can return the
proper count but then when i request the actual values it spits out 9
times as many
On Jul 21, 11:08 pm, Nick wrote:
> It looks like its returning every organization instance in the table,
>
> There are about 190 organizations
It looks like its returning every organization instance in the table,
There are about 190 organizations and 900 totals entries, each of
which are assigned an organization.
The count on the query is correct, but when I output the actual values
it returns every entry in the table, so I'm seeing mul
Each reader has an id, name, and organization. There are 900 readers
and about 190 organizations. I'm trying to return all of the
organizations, but instead its returning every id in the table. So I'm
seeing all of the table's entries instead of just a list of
organizations.
On Jul 21, 10:47 pm, K
On Thursday, July 22, 2010 09:10:31 am Nick wrote:
> Readers = Readers.objects.values_list('organization').distinct()
>
> The count returns 189 results but when I send it to output to a csv it
> returns all of the values, with duplicates which is something like 900
> entries.
by duplicates do you
I may be misunderstanding the values method but it is returning
duplicate results when I use the distinct method. I have a query that
pulls the values of a column:
Readers = Readers.objects.values_list('organization').distinct()
The count returns 189 results but when I send it to output to a csv
6 matches
Mail list logo