q() django code example
Example 1: q django
from django.db.models import Q
Q(question__startswith='Who') | Q(question__startswith='What')
Example 2: objects.filter django
>>> Entry.objects.filter(blog_id=4)
from django.db.models import Q
Q(question__startswith='Who') | Q(question__startswith='What')
>>> Entry.objects.filter(blog_id=4)