-
-
Save JorgeMichelena/9a0f02c9a9c8f54b111b6bf4361064d8 to your computer and use it in GitHub Desktop.
Q objects example query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db.models import Q | |
sport_targets = ( | |
Target.objects.filter( | |
Q(topic=Target.Topics.SPORTS) | Q(title__icontains="sport") | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment