Skip to content

Instantly share code, notes, and snippets.

@SmileyChris
Created May 2, 2012 00:05
Show Gist options
  • Save SmileyChris/2572531 to your computer and use it in GitHub Desktop.
Save SmileyChris/2572531 to your computer and use it in GitHub Desktop.
filters = Q()
for value in your_list:
filters |= Q(your_field=value)
qs = qs.filter(filters)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment