May 2018
Beginner to intermediate
526 pages
11h 57m
English
You can exclude certain results from your QuerySet using the exclude() method of the manager. For example, we can retrieve all posts published in 2017 whose titles don't start with Why:
Post.objects.filter(publish__year=2017) \ .exclude(title__startswith='Why')
Read now
Unlock full access