2011/2/21 Vinicius Massuchetto <viniciusmassuche...@gmail.com>:
> 2011/2/21 Daniel Roseman <dan...@roseman.org.uk>:
>> On Monday, February 21, 2011 5:47:42 PM UTC, Vinicius Massuchetto wrote:
>
>> You can't "convert" a list to queryset, as a queryset is - as the name
>> implies - a database query.
>
> I imagined that. =/
>
>> What you could do is get all the IDs from the list and pass that into a new
>> query:
>>     my_queryset = MyModel.objects.filter(id__in=[o.id for o in my_list])
>
> I tried that, and that's the problem.
>
> The objects I want don't really "exist", as my base data is the output
> for `SomeModel.objects.annotate(n = Count(n)).filter(n = 0)` of a
> ForeignKey of the model that I want to have the queryset overrided.

As I think things are amazingly confusing here, here's a detailed
description of what I'm trying to do:

http://stackoverflow.com/questions/5056362/django-admin-change-list-to-display-null-foreignkeys-backwards

Thanks for helping.
-- 
Vinicius Massuchetto
http://vinicius.soylocoporti.org.br

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to