filter with different operator in django

Solutions on MaxInterview for filter with different operator in django by the best coders in the world

showing results for - "filter with different operator in django"
Marin
19 Feb 2017
1from myapp.models import Entry
2from django.db.models import Q
3
4Entry.objects.filter(~Q(id=3))
5
6#will return all entries except the one(s) with 3 as their ID