Does the Django ORM support the SQL IN
operator? Something like:
SELECT *
FROM user
WHERE id IN (1, 5, 34, 567, 229)
How do I use the Django ORM to make a query like that?
Thanks.
User.objects.filter(id__in=[1, 5, 34, 567, 229])
print _.query
SELECT <fields> FROM "auth_user" WHERE "auth_user"."id" IN (1, 5, 34, 567, 229)