If they already exist as querysets, the set difference is the way to go.
There's probably no need to turn it back into a list at the end, since
Python's sets are iterable containers. It depends what you want to do
with it afterwards.
However, if you know the filters you are applying, you can get the
difference by changing all the filter() calls in the second queryset to
exclude() calls. So if you can hook into the process a bit earlier, you
might be able to generate a more effective SQL query.
Regards,
Malcolm
Please take any follow-ups to django-users. This mailing list is
for the internal development of Django itself. "How to use"
questions should go to the django-users mailing list.
Thanks,
Malcolm