Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

filter django or

#It is worth to note that it's possible to add Q expressions.
from django.db.models import Q

query = Q(first_name='mark')
query.add(Q(email='mark@test.com'), Q.OR)
query.add(Q(last_name='doe'), Q.AND)

queryset = User.objects.filter(query)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #filter #django
ADD COMMENT
Topic
Name
9+5 =