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))