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. I'm confused how to deal with that. Hope I made myself clear. Thanks. -- Vinicius Massuchetto -- 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.