How to do this using django object query:
SELECT * FROM test WHERE (test_id IN (SELECT test_id FROM test_subject_set)) AND (test_begin_time < \'\') AND (test
this worker for me:
Line.objects.filter(pk__in=[1, 2, 3])