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 documentation if you want more info.
Give it a whirl and see how it goes.
ALJ
On Jul 22, 6:09 pm, Nick <[email protected]> wrote:
> 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 <[email protected]> wrote:
>
>
>
> > 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 actualvalues
> > it returns every entry in the table, so I'm seeing multiple duplicate
> > organizations.
>
> > On Jul 21, 10:47 pm, Kenneth Gonsalves <[email protected]> wrote:
>
> > > 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 thevalues, with duplicates which is something like 900
> > > > entries.
>
> > > by duplicates do you mean the whole row is duplicate or it is duplicate
> > > with
> > > the exception of the id of the row?
> > > --
> > > Regards
> > > Kenneth Gonsalves
> > > Senior Associate
> > > NRC-FOSS at AU-KBC
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.