Method - 1:
You can use Q objects for this. They can be negated with the ~ operator and combined much like normal Python expressions:
from app_name.models import Entry
from django.db.models import Q
Entry.objects.filter(~Q(category =5))
will return all entries except category 5:
[<Entry: Entry object>, <Entry: Entry object>, <Entry: Entry object>, ...]
Method - 2:
You can use exclude
from myapp.models import Entry
Entry.objects.exclude(category=5)
Will return all entries except category 5:
[<Entry: Entry object>, <Entry: Entry object>, <Entry: Entry object>, ...]