Related questions
How to perform OR condition in django queryset?
I want to write a Django query equivalent to this SQL query:
SELECT * from user where income >= 5000 or income is NULL.
How to construct the Django queryset filter?
User.objects.filter(income__gte=5000, income=0)
This doesn't work, because it …
Django values_list vs values
In Django, what's the difference between the following two:
Article.objects.values_list('comment_id', flat=True).distinct()
vs
Article.objects.values('comment_id').distinct()
My goal is to get a list of unique comment ids under each Article. I've …