Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django queryset and operator

Model.objects.filter(x=1) & Model.objects.filter(y=2)
Model.objects.filter(x=1, 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
7+8 =