[Answered ]-Getting multiple user objects using filter

1👍

You can use <fieldname>__in:

users = User.objects.filter(username__in=['foo', 'bar'])

1👍

users = User.objects.filter(username__in=['foo', 'bar'])

Read the documentation

0👍

users = User.objects.filter(username__in=['foo', 'bar'])

Leave a comment