We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e7fe90 commit 24803b2Copy full SHA for 24803b2
source/includes/interact-data/specify-a-query.py
@@ -56,7 +56,9 @@ def __str__(self):
56
# end-filter-relationships
57
58
# start-filter-combine
59
-Movie.objects.filter(awards__text__istartswith="nominated")
+Movie.objects.filter(
60
+ (Q(title__startswith="Funny") | Q(title__startswith="Laugh"))
61
+ & ~Q(genres__contains=["Comedy"]))
62
# end-filter-combine
63
64
# start-sort
@@ -71,6 +73,10 @@ def __str__(self):
71
73
Movie.objects.filter(genres=["Crime", "Comedy"]).first()
72
74
# end-first
75
76
+# start-array
77
+Movie.objects.filter(genres__overlap=["Adventure", "Family"])
78
+# end-array
79
+
80
# start-json
81
Movie.objects.filter(imdb__votes__gt=900000)
82
# end-json
0 commit comments