Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django filter not equal to

from myapp.models import Entry
from django.db.models import Q
# Returns all entries except those with 3 as their id
Entry.objects.filter(~Q(id=3))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #django #filter #equal
ADD COMMENT
Topic
Name
2+8 =