Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django queryset or operator

Model.objects.filter(x=1) | Model.objects.filter(y=2)
from django.db.models import Q
Model.objects.filter(Q(x=1) | Q(y=2))
Source by docs.djangoproject.com #
 
PREVIOUS NEXT
Tagged: #django #queryset #operator
ADD COMMENT
Topic
Name
3+2 =