Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

filter with different operator in django

from myapp.models import Entry
from django.db.models import Q

Entry.objects.filter(~Q(id=3))

#will return all entries except the one(s) with 3 as their ID
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #filter #operator #django
ADD COMMENT
Topic
Name
9+9 =